From: j8takagi Date: Wed, 4 Jun 2014 09:28:21 +0000 (+0900) Subject: make gittagの動作を修正 X-Git-Tag: 0.2p8 X-Git-Url: https://j8takagi.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=23540a516c4ae4cd38e42a3c3b92f4b84a1fdba4;p=autotest_mk.git make gittagの動作を修正 --- diff --git a/Makefile b/Makefile index c1019d4..bd35b91 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,14 @@ CAT := cat -GITTAG := git tag +GIT := git +WC = wc XARGS := xargs +VERSION := $(shell $(CAT) VERSION) + +VERSIONGITREF := $(shell $(GIT) show-ref -s --tags $(VERSION)) + +MASTERGITREF := $(shell $(GIT) show-ref -s refs/heads/master) + .PHONY: docall gittag doc: @@ -10,6 +17,5 @@ doc: docall: $(MAKE) -C doc all -gittag: VERSION - $(CAT) $^ | $(XARGS) $(GITTAG) - +gittag: + if test `$(GIT) status -s | $(WC) -l` -gt 0; then $(ECHO) "Error: commit, first."; exit 1; fi; if test "$(VERSIONGITREF)" != "$(MASTERGITREF)"; then $(GIT) tag $(VERSION); fi diff --git a/VERSION b/VERSION index f28b352..89e0829 100644 --- a/VERSION +++ b/VERSION @@ -1,2 +1,2 @@ -0.2p7 +0.2p8