From 4b6947855037c90559c966e25310c3df2193e51a Mon Sep 17 00:00:00 2001 From: Bruno Dias Date: Fri, 9 Jun 2017 22:20:35 -0300 Subject: [PATCH] [chore] clean publish resources before start... * remove .branch and .version before publish. --- Makefile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 0d7250c7..4a3f02ee 100644 --- a/Makefile +++ b/Makefile @@ -68,7 +68,9 @@ build-docs: @$(JQ) '.version' package.json | cut -d\" -f2 > .version .branch: - git branch | grep '^*' | awk '{ print $$2 }' > .branch + @echo "[Release from branch]" + @git branch | grep '^*' | awk '{ print $$2 }' > .branch + @echo "Current branch: `cat .branch`" release-commit: git commit --allow-empty -m "Release v`cat .version`." @@ -83,10 +85,12 @@ publish-version: release-commit release-tag git push $(REMOTE) "`cat .branch`" "v`cat .version`" npm publish -publish-finished: +publish-finished: clean + +clean: @rm -rf .version .branch -pre-publish: .branch .version deps-project tests-ci build +pre-publish: clean .branch .version deps-project tests-ci build publish: pre-publish publish-version publish-finished