Update release script
- fix paths of sha256sum - check for old artifacts before doing the release
This commit is contained in:
parent
5e297827d3
commit
8c00e74df9
3
Makefile
3
Makefile
@ -26,6 +26,9 @@ $(foreach goosarch,$(GOOSARCHS),\
|
||||
.PHONY: all
|
||||
all: $(UNDOCKERS) sha256sum-$(VSN).txt
|
||||
|
||||
.PHONY: sha256sum-asc
|
||||
sha256sum-asc: sha256sum-$(VSN).txt.asc
|
||||
|
||||
.PHONY: lint
|
||||
lint:
|
||||
go vet ./...
|
||||
|
9
release
9
release
@ -9,7 +9,10 @@ err() {
|
||||
git status --porcelain | grep -q "" &&
|
||||
err "working tree is dirty, commit your changes first."
|
||||
|
||||
[[ ! "$1" =~ ^v([0-9]+)\.([0-9]+)(\.([0-9]+))?$ ]] && \
|
||||
[[ -f sha256sum-* ]] &&
|
||||
err "found artifacts from previous release, delete them first"
|
||||
|
||||
[[ "$1" =~ ^v([0-9]+)\.([0-9]+)(\.([0-9]+))?$ ]] || \
|
||||
err "arg1 accepts the following formats: v1.0 v1.0.0"
|
||||
|
||||
git tag | grep -q "^$1$" &&
|
||||
@ -17,7 +20,7 @@ git tag | grep -q "^$1$" &&
|
||||
|
||||
last_tag=$(git tag | tail -1)
|
||||
|
||||
make -B -j"$(nproc)" VSN="$1" sha256sum.txt.asc
|
||||
make -B -j"$(nproc)" VSN="$1" sha256sum-asc
|
||||
|
||||
{
|
||||
echo undocker "$1"
|
||||
@ -27,6 +30,6 @@ make -B -j"$(nproc)" VSN="$1" sha256sum.txt.asc
|
||||
echo
|
||||
echo
|
||||
echo sha256sums of released binaries:
|
||||
cat sha256sum.txt
|
||||
cat sha256sum-*.txt
|
||||
echo
|
||||
} | git tag -u motiejus@jakstys.lt -F - "$1"
|
||||
|
Loading…
Reference in New Issue
Block a user