add check for "snapshot-BRANCH_SLUG" arg to update-all-qqq-deps.sh -- if given, then we look for branchy versions, else we use main versions [skip ci]

This commit is contained in:
2023-05-25 10:55:10 -05:00
parent 515e04ecfe
commit 5185758855
2 changed files with 10 additions and 3 deletions

View File

@ -97,7 +97,7 @@ else
artifact=$1 artifact=$1
version=$2 version=$2
if [ "$version" == "-l" ]; then if [ "$version" == "-s" ]; then
useSlug=$(checkForBranchBuild $artifact) useSlug=$(checkForBranchBuild $artifact)
if [ "$useSlug" == "1" ]; then if [ "$useSlug" == "1" ]; then
version=$SLUG version=$SLUG
@ -105,9 +105,11 @@ else
version=$CURRENT_VERSION version=$CURRENT_VERSION
fi fi
echo "Using $version for $artifact" >&2 echo "Using $version for $artifact" >&2
elif [ "$version" == "-l" ]; then
version=$CURRENT_VERSION
fi fi
if [ -z "$ar^tifact" -o -z "$version" ]; then if [ -z "$artifact" -o -z "$version" ]; then
echo "Usage: $0 artifact snapshot-version-prefix" echo "Usage: $0 artifact snapshot-version-prefix"
echo " or: $0 artifact -l (latest of CURRENT_VERSION, or branch-slug, if it has been deployed)" echo " or: $0 artifact -l (latest of CURRENT_VERSION, or branch-slug, if it has been deployed)"
echo " or: $0 -i (interactive mode)" echo " or: $0 -i (interactive mode)"

View File

@ -13,9 +13,14 @@ fi
CURRENT_VERSION="$(cat $QQQ_DEV_TOOLS_DIR/CURRENT-SNAPSHOT-VERSION)" CURRENT_VERSION="$(cat $QQQ_DEV_TOOLS_DIR/CURRENT-SNAPSHOT-VERSION)"
MODULE_LIST_FILE=$QQQ_DEV_TOOLS_DIR/MODULE_LIST MODULE_LIST_FILE=$QQQ_DEV_TOOLS_DIR/MODULE_LIST
getLatestSnapshotArg="-l"
if [[ "$1" == "snapshot-BRANCH_SLUG" ]]; then
getLatestSnapshotArg="-s"
fi
for module in $(cat $MODULE_LIST_FILE); do for module in $(cat $MODULE_LIST_FILE); do
echo "Updating $module..." echo "Updating $module..."
version=$(get-latest-snapshot.sh $module -l) version=$(get-latest-snapshot.sh $module $getLatestSnapshotArg)
update-dep.sh $module $version -q update-dep.sh $module $version -q
done done