remove unnecessary support for prebuilt binaries
the users will know how to build the binaries themselves.main
parent
e4c0d4d72a
commit
0ff72b99d9
@ -1,39 +1,25 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
err() {
|
||||
>&2 echo "ERROR: $*"
|
||||
exit 1
|
||||
}
|
||||
_err(){ >&2 echo "ERROR: $*"; exit 1; }
|
||||
|
||||
git status --porcelain | grep -q "" &&
|
||||
err "working tree is dirty, commit your changes first."
|
||||
|
||||
# https://raimue.blog/2010/09/09/bash-for-loop-with-glob-patterns/
|
||||
shopt -s nullglob
|
||||
for file in sha256sum-*; do
|
||||
err "found $file from previous release, delete it first"
|
||||
done
|
||||
shopt -u nullglob
|
||||
_err "working tree is dirty, commit your changes first."
|
||||
|
||||
[[ "$1" =~ ^v([0-9]+)\.([0-9]+)(\.([0-9]+))?$ ]] || \
|
||||
err "arg1 accepts the following formats: v1.0 v1.0.0"
|
||||
_err "arg1 accepts the following formats: v1.0 v1.0.0"
|
||||
|
||||
git tag | grep -q "^$1$" &&
|
||||
err "tag $1 already exists"
|
||||
_err "tag $1 already exists"
|
||||
|
||||
last_tag=$(git tag | tail -1)
|
||||
# sanity test: do the tests pass?
|
||||
make -B -j"$(nproc)" test lint
|
||||
|
||||
make -B -j"$(nproc)" VSN="$1" sha256sum-asc
|
||||
last_tag=$(git tag | tail -1)
|
||||
|
||||
{
|
||||
echo undocker "$1"
|
||||
echo
|
||||
echo Changelog since "$last_tag":
|
||||
git log --pretty=format:"- [%cn] %s" "$last_tag"..HEAD
|
||||
echo
|
||||
echo
|
||||
echo sha256sums of released binaries:
|
||||
cat sha256sum-*.txt
|
||||
echo
|
||||
} | git tag -u motiejus@jakstys.lt -F - "$1"
|
||||
|
Loading…
Reference in New Issue