Skip to content

Commit 4530510

Browse files
committed
check if provided argument is valid
1 parent 545b5e7 commit 4530510

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

java/ql/automodel/publish.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ if [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
99
exit 0
1010
fi
1111

12+
# If there's an $1 argument, then check it's "override-release"
13+
if [ -n "${1:-}" ]; then
14+
if [ "$1" != "override-release" ]; then
15+
echo "Error: The only valid argument is 'override-release'"
16+
exit 1
17+
fi
18+
fi
19+
1220
# If we're publishing the codeml-automodel release then we will checkout the sha specified in the release.
1321
# So we need to check that there are no uncommitted changes in the local branch.
1422
# And, if we're publishing the current HEAD, it's cleaner to ensure that there are no uncommitted changes.

0 commit comments

Comments
 (0)