-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport of add build support script to print out the submodule versi…
…ons required in other submodules into release/1.19.x (#21637) * backport of commit 7a0d3ca * backport of commit 2ae8013 --------- Co-authored-by: John Murret <[email protected]>
- Loading branch information
1 parent
249141d
commit ea4cf5e
Showing
2 changed files
with
72 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (c) HashiCorp, Inc. | ||
# SPDX-License-Identifier: BUSL-1.1 | ||
|
||
|
||
readonly SCRIPT_NAME="$(basename ${BASH_SOURCE[0]})" | ||
readonly SCRIPT_DIR="$(dirname "${BASH_SOURCE[0]}")" | ||
readonly SOURCE_DIR="$(dirname "$(dirname "${SCRIPT_DIR}")")" | ||
readonly FN_DIR="$(dirname "${SCRIPT_DIR}")/functions" | ||
|
||
source "${SCRIPT_DIR}/functions.sh" | ||
|
||
function usage { | ||
cat <<-EOF | ||
Usage: ${SCRIPT_NAME} [<options ...>] | ||
Description: | ||
This script reports the consul module versions in each of the go.mod files in the Consul repository. | ||
Options: | ||
-h | --help Print this help text. | ||
EOF | ||
} | ||
|
||
function err_usage { | ||
err "$1" | ||
err "" | ||
err "$(usage)" | ||
} | ||
|
||
function main { | ||
while test $# -gt 0 | ||
do | ||
case "$1" in | ||
-h | --help ) | ||
usage | ||
return 0 | ||
;; | ||
*) | ||
err_usage "ERROR: Unknown argument: '$1'" | ||
return 1 | ||
;; | ||
esac | ||
done | ||
|
||
get_consul_module_versions || return 1 | ||
|
||
return 0 | ||
} | ||
|
||
main "$@" | ||
exit $? | ||
|