Skip to content

Commit

Permalink
[launcher] hot-deploy loops through all ides
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Falzetti authored and roboquat committed Dec 16, 2022
1 parent 03075ce commit 0b4662b
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions components/ide/jetbrains/launcher/hot-deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,13 @@ dev_image="$(tar xfO "$bldfn" ./imgnames.txt | head -n1)"
echo "Dev Image: $dev_image"

cf_patch=$(kubectl get cm ide-config -o=json | jq '.data."config.json"' |jq -r)
# TODO: replace with for loop over .ideOptions.clients."jetbrains-gateway".desktopIDEs
# second image is always jb-launcher, if position is changed then this script should be updated as well
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.intellij.imageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.intellij.latestImageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.goland.imageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.goland.latestImageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.pycharm.imageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.pycharm.latestImageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.phpstorm.imageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.phpstorm.latestImageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.rubymine.imageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.rubymine.latestImageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.webstorm.imageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.webstorm.latestImageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.rider.imageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.rider.latestImageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.clion.imageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.clion.latestImageLayers[1] = \"$dev_image\"")
ides=$(echo "$cf_patch" |jq '.ideOptions.clients."jetbrains-gateway".desktopIDEs')
for ide in $(echo "$ides" | jq -r '.[]'); do
# second image is always jb-launcher, if position is changed then this script should be updated as well
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.${ide}.imageLayers[1] = \"$dev_image\"")
cf_patch=$(echo "$cf_patch" |jq ".ideOptions.options.${ide}.latestImageLayers[1] = \"$dev_image\"")
done

cf_patch=$(echo "$cf_patch" |jq tostring)
cf_patch="{\"data\": {\"config.json\": $cf_patch}}"

Expand Down

0 comments on commit 0b4662b

Please sign in to comment.