Skip to content

Commit

Permalink
Merge branch 'fix-sns-script' into 'master'
Browse files Browse the repository at this point in the history
chore: Fix sns-canister-publish proposal generation script

This fixes the script's self-documentation and validation to be consistent with what's intended. 

See merge request dfinity-lab/public/ic!20143
  • Loading branch information
jasonz-dfinity committed Jun 28, 2024
2 parents ad5629c + 90c462d commit 3b0dd1b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ source "$NNS_TOOLS_DIR/lib/include.sh"

help() {
print_green "
Usage: $0 <SNS_CANISTER_TYPE> <TARGET_VERSION> <LAST_PUBLISHED_VERSION> (<OUTPUT_FILE>)
Usage: $0 <SNS_CANISTER_TYPE> <TARGET_VERSION> (<OUTPUT_FILE>)
SNS_CANISTER_TYPE: Canister type to be published (root, governance, ledger, swap, archive, index)
TARGET_VERSION: Git hash of new version to be published to production
OUTPUT_FILE: File to write contents to (otherwise stdout is used)
Expand All @@ -21,14 +21,14 @@ Usage: $0 <SNS_CANISTER_TYPE> <TARGET_VERSION> <LAST_PUBLISHED_VERSION> (<OUTPUT
exit 1
}

if [ $# -lt 3 ]; then
if [ $# -lt 2 ]; then
help
fi

SNS_CANISTER_TYPE=$1
TARGET_VERSION=$2
OUTPUT_FILE=${3:-}
LAST_PUBLISHED_VERSION=${LAST_PUBLISHED_VERSION:-$(sns_mainnet_git_commit_id $SNS_CANISTER_TYPE)}
LAST_PUBLISHED_VERSION=${LAST_PUBLISHED_VERSION:-$(sns_mainnet_git_commit_id "$SNS_CANISTER_TYPE")}

IC_ROOT=$(repo_root)

Expand Down

0 comments on commit 3b0dd1b

Please sign in to comment.