Merge pull request #22554 from BenTheElder/auto-version

automatically tag docker image based on hugo version and dockerfile v…
This commit is contained in:
Kubernetes Prow Robot
2020-07-26 20:52:16 -07:00
committed by GitHub
2 changed files with 12 additions and 1 deletions
+10
View File
@@ -0,0 +1,10 @@
#!/bin/sh
# this script emits as hash for the files listed in $@
if command -v shasum >/dev/null 2>&1; then
cat "$@" | shasum -a 256 | cut -d' ' -f1
elif command -v sha256sum >/dev/null 2>&1; then
cat "$@" | sha256sum | cut -d' ' -f1
else
echo "missing shasum tool" 1>&2
exit 1
fi