From 4a50803e017875c11b6c8dd430933e4fb53378c3 Mon Sep 17 00:00:00 2001 From: Nedyalko Dyakov Date: Fri, 21 Nov 2025 11:28:06 +0200 Subject: [PATCH] fix help call in tag.sh --- scripts/tag.sh | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/scripts/tag.sh b/scripts/tag.sh index 5b6376377a..62b28e9960 100755 --- a/scripts/tag.sh +++ b/scripts/tag.sh @@ -4,9 +4,25 @@ set -e DRY_RUN=1 +helps() { + cat <<- EOF +Usage: $0 TAGVERSION [-t] + +Creates git tags for public Go packages. + +ARGUMENTS: + TAGVERSION Tag version to create, for example v1.0.0 + +OPTIONS: + -t Execute git commands (default: dry run) +EOF + exit 0 +} + + if [ $# -eq 0 ]; then echo "Error: Tag version is required" - help + helps fi TAG=$1 @@ -24,20 +40,6 @@ while getopts "t" opt; do esac done -help() { - cat <<- EOF -Usage: $0 TAGVERSION [-t] - -Creates git tags for public Go packages. - -ARGUMENTS: - TAGVERSION Tag version to create, for example v1.0.0 - -OPTIONS: - -t Execute git commands (default: dry run) -EOF - exit 0 -} if [ "$DRY_RUN" -eq 1 ]; then echo "Running in dry-run mode"