From b952be6f563c057f319b97d5cc38f5e90af27727 Mon Sep 17 00:00:00 2001 From: Koen Punt Date: Thu, 10 Jul 2014 10:51:36 +0200 Subject: [PATCH] add makefile release task --- Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 67d860b..22191d1 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ URCHIN=`which urchin` SHELLS=sh bash dash ksh zsh TEST_SUITE=fast -.PHONY: $(SHELLS) test +.PHONY: $(SHELLS) test verify-tag release $(SHELLS): @printf '\n\033[0;34m%s\033[0m\n' "Running tests in $@" @@ -13,3 +13,13 @@ test: $(SHELLS) default: test +verify-tag: +ifndef TAG + $(error TAG is undefined) +endif + +release: verify-tag + @ OLD_TAG=`git describe --abbrev=0 --tags` && \ + npm version "$(TAG)" && \ + replace "$${OLD_TAG/v/}" "$(TAG)" -- nvm.sh install.sh README.markdown && \ + git commit --amend nvm.sh install.sh README.markdown package.json