diff options
author | Craig Hesling <hesling@chromium.org> | 2020-09-10 12:13:41 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-11-03 09:45:28 +0000 |
commit | e905f32593450568c4075a80bbd4573e06d8a6e3 (patch) | |
tree | a130033a2e9572e54d89cec6a818b8f1789223d6 | |
parent | bf2d7da23cb9c3316bd746226c90ff05d1071f9f (diff) | |
download | chrome-ec-e905f32593450568c4075a80bbd4573e06d8a6e3.tar.gz |
util/getversion.sh: Make input env vars more explicit
This also makes cros lint (shellcheck) happy.
This doesn't change any of the current usages of these variables.
BRANCH=none
BUG=b:168613053
TEST=./util/compare_build.sh # This forces a static version
TEST=BOARD=bloonchipper CR50_DEV=blah ./util/getversion.sh
TEST=BOARD=bloonchipper CR50_DEV=blah CR50_SQA=1 ./util/getversion.sh
TEST=BOARD=cr50 CRYPTO_TEST=1 ./util/getversion.sh
Signed-off-by: Craig Hesling <hesling@chromium.org>
Change-Id: I4ad34b4a9d0c8823568ddfecd50f87f55666c902
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2404474
Reviewed-by: Mike Frysinger <vapier@chromium.org>
-rwxr-xr-x | util/getversion.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/util/getversion.sh b/util/getversion.sh index 77a14c3324..8b46034e80 100755 --- a/util/getversion.sh +++ b/util/getversion.sh @@ -6,7 +6,13 @@ # # Generate version information for the EC binary +: "${BOARD:=}" +: "${CR50_DEV:=}" +: "${CR50_SQA:=}" +: "${CRYPTO_TEST:=}" : "${REPRODUCIBLE_BUILD:=}" +: "${STATIC_VERSION:=}" +: "${VCSID:=}" # Use this symbol as a separator to be able to reliably concatenate strings of # text. @@ -63,6 +69,7 @@ get_tree_version() { vbase="${ver_major}.${ver_branch}.${numcommits}${marker}${ghash}" else # Fall back to the VCSID provided by the packaging system if available. + # Ex VCSID: 0.0.1-r1519-9b368af6a4943b90941471d0bdf7e7208788f898 if ghash=${VCSID##*-}; then vbase="1.1.9999-${ghash:0:7}" else |