chore: Add release process

This commit is contained in:
tsuyoshiwada 2018-02-18 22:57:17 +09:00
parent ec1d4dec3c
commit 8292ab7d2c
4 changed files with 9 additions and 3 deletions

1
.gitignore vendored
View file

@ -1,5 +1,6 @@
/tmp
/.tmp
/dist
# Created by https://www.gitignore.io/api/osx,macos,go

View file

@ -17,6 +17,4 @@ branches:
only:
- master
after_success:
- echo "TODO release process"
# - gox -os "darwin linux windows" -arch "amd64" -output "dist/{{.OS}}_{{.Arch}}_{{.Dir}}" .
# - ghr --username tsuyoshiwada --token $GITHUB_TOKEN --replace `grep 'Version =' version.go | sed -E 's/.*"(.+)"$$/\1/'` dist/
- ./scripts/release.sh

View file

@ -8,6 +8,7 @@ deps:
.PHONY: clean
clean:
rm -rf ./vendor/
rm -rf ./dist/
rm -rf ./git-chglog
rm -rf $(GOPATH)/bin/git-chglog

6
scripts/release.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/bash
if [[ "$TRAVIS_BRANCH" == "master" ]]; then
gox -os="darwin linux windows" -arch="amd64 386" -output="$(pwd)/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/
fi