From e3a57fc956f7b9c5c8b9ecd3694c0b65fd86626f Mon Sep 17 00:00:00 2001 From: Chris Waldon Date: Sun, 8 Mar 2020 17:53:14 -0400 Subject: [PATCH] ci/cd: fix backwards release logic Previously it would attempt to perform a real release only on a non-tagged commit. This was a mistake, and is exactly the opposite of what was desired. --- .builds/release.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.builds/release.sh b/.builds/release.sh index 9e9dbf1..2e5278f 100755 --- a/.builds/release.sh +++ b/.builds/release.sh @@ -18,7 +18,8 @@ elif find "$HOME/go/bin" -executable -type f -name goreleaser; then goreleaser_path="$HOME/go/bin/goreleaser" fi -if [ "$PUBLISH_RELEASE" -eq 1 ]; then +if [ "$PUBLISH_RELEASE" -eq 0 ]; then + # Build but do not publish GORELEASER_FLAGS="--snapshot --skip-publish" fi @@ -29,7 +30,6 @@ fi # sort the hashes of the built binaries in a reliable (if derpy) way find dist -executable -type f -exec sha256sum '{}' \; | rev | sort | rev -# check if we're on master and on a tag if [ "$PUBLISH_RELEASE" -eq 1 ]; then # erase the non-tarred directories from disk find dist -type d --exec rm -rf '{}' \;