1

[release] add to CI

This commit is contained in:
Motiejus Jakštys
2022-04-18 12:35:14 +03:00
parent 557e75efda
commit 486a26a196
3 changed files with 25 additions and 1 deletions

View File

@@ -1,6 +1,9 @@
#!/bin/bash
set -xeuo pipefail
sign=(-u motiejus@jakstys.lt)
[[ $1 == "--nosign" ]] && { sign=(); shift; }
_err(){ >&2 echo "ERROR: $*"; exit 1; }
git status --porcelain | grep -q "" &&
@@ -20,7 +23,7 @@ last_tag=$(git tag | tail -1)
echo Changelog since "$last_tag":
git log --pretty=format:"- [%an] %s" "$last_tag"..HEAD | \
grep -v "Update release notes for $last_tag"
} | git tag -u motiejus@jakstys.lt -F - "$1"
} | git tag "${sign[@]}" -F - "$1"
shasum=$(git archive --prefix="bazel-zig-cc-$1/" --format=tar "$1" | \
gzip -n | sha256sum | cut -f1 -d" ")