Skip to content

Commit

Permalink
ci/cd: fix backwards release logic
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
whereswaldon committed Mar 8, 2020
1 parent 1da32d0 commit e3a57fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .builds/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 '{}' \;
Expand Down

0 comments on commit e3a57fc

Please sign in to comment.