mirror of
https://github.com/github/codeql.git
synced 2026-05-01 19:55:15 +02:00
Make --lang a required script argument
This commit is contained in:
@@ -15,22 +15,21 @@ usage()
|
||||
cat >&2 <<EOF
|
||||
${app_name}: $@
|
||||
${app_name}: Generate skeleton upgrade script.
|
||||
Usage: ${app_name} [--prev_hash <COMMITISH>] [--lang <LANG>]"
|
||||
Usage: ${app_name} --lang <LANG> [--prev_hash <COMMITISH>]"
|
||||
|
||||
--lang <LANG>
|
||||
Language to update the schema for.
|
||||
|
||||
--prev-hash <COMMITISH>
|
||||
Hash/branch to use to get SHA1 for previous DB scheme.
|
||||
Default: origin/main
|
||||
|
||||
--lang <LANG>
|
||||
Language to update the schema for.
|
||||
|
||||
Must be run within the git repo needing an update.
|
||||
EOF
|
||||
exit "${exit_code}"
|
||||
}
|
||||
|
||||
prev_hash="origin/main"
|
||||
lang="cpp"
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
@@ -72,6 +71,10 @@ if [ $# -gt 0 ]; then
|
||||
usage 2 "Unrecognised operand: $1"
|
||||
fi
|
||||
|
||||
if [ -z ${lang+x} ]; then
|
||||
usage 2 "No language specified"
|
||||
fi
|
||||
|
||||
top_level="$(git rev-parse --show-superproject-working-tree)"
|
||||
|
||||
if [ "x${top_level}" = "x" ]; then
|
||||
|
||||
Reference in New Issue
Block a user