From f47436e158ee918c328d104fbcb0296786a803dd Mon Sep 17 00:00:00 2001 From: Matthias Kadenbach Date: Wed, 8 Feb 2017 19:54:50 -0800 Subject: [PATCH] add make release --- .travis.yml | 2 +- Makefile | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index a08c3d0e..afcdca0d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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: diff --git a/Makefile b/Makefile index 54aa7938..5b6237b3 100644 --- a/Makefile +++ b/Makefile @@ -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)