From fc2b625debd4d9c3a3cdab95fc710120486cf2ed Mon Sep 17 00:00:00 2001 From: tsuyoshiwada Date: Sun, 18 Feb 2018 23:13:07 +0900 Subject: [PATCH] chore: Fix release script --- scripts/release.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/release.sh b/scripts/release.sh index dfc149c0..6431dd21 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -1,6 +1,12 @@ #!/bin/bash +REPO_ROOT=$(git rev-parse --show-toplevel) + if [[ "$TRAVIS_BRANCH" == "master" ]]; then - gox -os="darwin linux windows" -arch="amd64 386" -output="$(pwd)/dist/{{.Dir}}_{{.OS}}_{{.Arch}}" ./cmd/git-chglog + echo "Start release ..." + gox -os="darwin linux windows" -arch="amd64 386" -output="$REPO_ROOT/dist/{{.Dir}}_{{.OS}}_{{.Arch}}" ./cmd/git-chglog ghr --username git-chglog --token $GITHUB_TOKEN --replace `grep 'Version =' ./cmd/git-chglog/version.go | sed -E 's/.*"(.+)"$$/\1/'` dist/ + echo "Released!" +else + echo "Skip release" fi