Skip to content

Commit 6b1d82a

Browse files
committed
commit hash not needed for monthly
1 parent 99baea1 commit 6b1d82a

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

build/prepare-release.sh

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,16 @@
22

33
# This script is used to prepare a release of the dev containers.
44
# It will bump the version of the manifest.json file and run the devcontainer upgrade command.
5-
# It will only run on the images that have been modified since the last release commit that is passed in as the first argument.
6-
# If the second argument is "monthly", it will run on all images.
5+
# It will only run on the images that have been modified since the last release.
6+
# If no commit hash is provided, it will run in monthly release mode and bump the version of all images.
77
# Example adhoc release: ./build/prepare-release.sh 1c6f558dc86aafd7749074ec44e238f331303517
8-
# Example monthly release: ./build/prepare-release.sh 1c6f558dc86aafd7749074ec44e238f331303517 monthly
8+
# Example monthly release: ./build/prepare-release.sh
99

1010

1111
SCRIPT_SOURCE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
1212
SRC_DIR=$(readlink -m $SCRIPT_SOURCE_DIR/../src)
1313
MANIFEST_FILE="manifest.json"
1414
COMMIT_HASH=$1
15-
RELEASE_TYPE=$2
1615

1716
get_modified_images() {
1817
git diff --name-only --diff-filter=ACMRTUB ${COMMIT_HASH} HEAD ${SRC_DIR} | while read file; do
@@ -65,11 +64,7 @@ monthly_release() {
6564

6665
main() {
6766
if [ "$COMMIT_HASH" == "" ]; then
68-
echo "Commit hash is required"
69-
exit 1
70-
fi
71-
72-
if [ "$RELEASE_TYPE" == "monthly" ]; then
67+
echo "No commit hash provided, running in monthly release mode"
7368
monthly_release
7469
else
7570
adhoc_release

0 commit comments

Comments
 (0)