git-chglog/scripts/release.sh
2018-02-18 23:13:07 +09:00

12 lines
439 B
Bash
Executable file

#!/bin/bash
REPO_ROOT=$(git rev-parse --show-toplevel)
if [[ "$TRAVIS_BRANCH" == "master" ]]; then
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