diff options
author | Grant Oakley <groakley@google.com> | 2021-10-01 14:00:04 -0700 |
---|---|---|
committer | Dagger Team <dagger-dev+copybara@google.com> | 2021-10-01 14:01:33 -0700 |
commit | 0ec175b4c79632660c81bced1dfd294e21f1a9ce (patch) | |
tree | c6460ea98a91606e532349363ada329cb2fbd945 /util | |
parent | bf29e103373955463bee669583d37fa673add9d1 (diff) | |
download | dagger2-0ec175b4c79632660c81bced1dfd294e21f1a9ce.tar.gz |
Internal doc update
RELNOTES=N/A
PiperOrigin-RevId: 400285427
Diffstat (limited to 'util')
-rw-r--r-- | util/shasum.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/util/shasum.sh b/util/shasum.sh new file mode 100644 index 000000000..47d96ab96 --- /dev/null +++ b/util/shasum.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +set -eu + +if [ $# -lt 1 ]; then + echo "usage $0 <version-name>" + exit 1; +fi +readonly VERSION_NAME=$1 +shift 1 + +if [[ ! "$VERSION_NAME" =~ ^2\. ]]; then + echo 'Version name must begin with "2."' + exit 2 +fi + +if [[ "$VERSION_NAME" =~ " " ]]; then + echo "Version name must not have any spaces" + exit 3 +fi + +pushd $(mktemp -d) +wget https://github.com/google/dagger/archive/dagger-$VERSION_NAME.zip -P . +OUTPUT=$(shasum -a 256 dagger-$VERSION_NAME.zip) +echo "SHA sum: $OUTPUT" +popd |