Skip to content

Commit 1bb9e0d

Browse files
authored
chore(scripts: fix help call in tag.sh (#3606)
1 parent 5b0b228 commit 1bb9e0d

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

scripts/tag.sh

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,25 @@ set -e
44

55
DRY_RUN=1
66

7+
helps() {
8+
cat <<- EOF
9+
Usage: $0 TAGVERSION [-t]
10+
11+
Creates git tags for public Go packages.
12+
13+
ARGUMENTS:
14+
TAGVERSION Tag version to create, for example v1.0.0
15+
16+
OPTIONS:
17+
-t Execute git commands (default: dry run)
18+
EOF
19+
exit 0
20+
}
21+
22+
723
if [ $# -eq 0 ]; then
824
echo "Error: Tag version is required"
9-
help
25+
helps
1026
fi
1127

1228
TAG=$1
@@ -24,20 +40,6 @@ while getopts "t" opt; do
2440
esac
2541
done
2642

27-
help() {
28-
cat <<- EOF
29-
Usage: $0 TAGVERSION [-t]
30-
31-
Creates git tags for public Go packages.
32-
33-
ARGUMENTS:
34-
TAGVERSION Tag version to create, for example v1.0.0
35-
36-
OPTIONS:
37-
-t Execute git commands (default: dry run)
38-
EOF
39-
exit 0
40-
}
4143

4244
if [ "$DRY_RUN" -eq 1 ]; then
4345
echo "Running in dry-run mode"

0 commit comments

Comments
 (0)