diff --git a/build/upgrade-lockfiles.sh b/build/upgrade-lockfiles.sh new file mode 100755 index 000000000..0b91b5a52 --- /dev/null +++ b/build/upgrade-lockfiles.sh @@ -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}/" + 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 \ No newline at end of file