Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a helper script for "devcontainer upgrades" #955

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions build/upgrade-lockfiles.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Pass image name to upgrade only a single image, else it upgrades all the images
IMAGE_NAME=$1
workspaceFolder="/workspaces/images/src"

if [ ! -z "$IMAGE_NAME" ]; then
echo "-----------------------------------------------"
echo "Upgrading image $IMAGE_NAME"
echo "-----------------------------------------------"
devcontainer upgrade --workspace-folder "${workspaceFolder}/${IMAGE_NAME}/"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prepare release script is already doing this

echo "-----------------------------------------------"
echo "Releasing image $image"
echo "-----------------------------------------------"
bump_version $image
rm "${image}/.devcontainer/devcontainer-lock.json"
devcontainer upgrade --workspace-folder $image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But doesn’t that one also updates the versions in manifests?
Whenever I create a PR with some changes, I prefer to run upgrade command. Also, so that the dev tags which are scheduled on Monday could test with latest Features

exit 0
fi

for dir in /workspaces/images/src/*/
do
cd "${dir}"
image=$(basename $dir)
echo "-----------------------------------------------"
echo "Upgrading image $image"
echo "-----------------------------------------------"
devcontainer upgrade --workspace-folder .
cd ..
done
Loading