aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorGrant Oakley <groakley@google.com>2021-10-01 14:00:04 -0700
committerDagger Team <dagger-dev+copybara@google.com>2021-10-01 14:01:33 -0700
commit0ec175b4c79632660c81bced1dfd294e21f1a9ce (patch)
treec6460ea98a91606e532349363ada329cb2fbd945 /util
parentbf29e103373955463bee669583d37fa673add9d1 (diff)
downloaddagger2-0ec175b4c79632660c81bced1dfd294e21f1a9ce.tar.gz
Internal doc update
RELNOTES=N/A PiperOrigin-RevId: 400285427
Diffstat (limited to 'util')
-rw-r--r--util/shasum.sh26
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