add make release

This commit is contained in:
Matthias Kadenbach 2017-02-08 19:54:50 -08:00
parent f474e4cae1
commit f47436e158
2 changed files with 8 additions and 2 deletions

View File

@ -23,9 +23,9 @@ script:
after_success:
- goveralls -service=travis-ci -coverprofile .coverage/combined.txt
- make list-external-deps > dependency_tree.txt && cat dependency_tree.txt
before_deploy:
- make list-external-deps > dependency_tree.txt && cat dependency_tree.txt
- make build-cli
deploy:

View File

@ -82,6 +82,12 @@ rewrite-import-paths:
find . -name '*.go' -type f -execdir sed -i '' s%\"github.com/mattes/migrate%\"github.com/$(REPO_OWNER)/migrate%g '{}' \;
# make release V=0.0.0
release:
git tag v$(V)
@read -p "Press enter to confirm and push to origin ..." && git push origin v$(V)
define external_deps
@echo -- $(1)
@go list -f '{{join .Deps "\n"}}' $(1) | grep -v github.com/$(REPO_OWNER)/migrate | xargs go list -f '{{if not .Standard}}{{.ImportPath}}{{end}}'
@ -90,7 +96,7 @@ endef
.PHONY: build-cli clean test-short test test-with-flags deps html-coverage \
restore-import-paths rewrite-import-paths list-external-deps
restore-import-paths rewrite-import-paths list-external-deps release
SHELL = /bin/bash
RAND = $(shell echo $$RANDOM)