summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2012-06-16 08:51:33 -0700
committerisaacs <i@izs.me>2012-06-16 08:51:33 -0700
commitbdd57f075631381e5ccff74dd78055f206b65f4d (patch)
tree29eb850d48d917504f29a6d9baf362a3ee5565d9 /Makefile
parent145612c2f51e4dfa536f6d1a538ab600aad69e52 (diff)
downloadnode-new-bdd57f075631381e5ccff74dd78055f206b65f4d.tar.gz
Makefile: Refuse to build release from unclean repo
Root cause of an error during the 0.7.11 release
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 52d90f0f95..3eada059b4 100644
--- a/Makefile
+++ b/Makefile
@@ -208,6 +208,17 @@ $(PKG):
--out $(PKG)
$(TARBALL): node out/doc
+ @if [ "$(shell git status --porcelain | egrep -v '^\?\? ')" = "" ]; then \
+ exit 0 ; \
+ else \
+ echo "" >&2 ; \
+ echo "The git repository is not clean." >&2 ; \
+ echo "Please commit changes before building release tarball." >&2 ; \
+ echo "" >&2 ; \
+ git status --porcelain | egrep -v '^\?\?' >&2 ; \
+ echo "" >&2 ; \
+ exit 1 ; \
+ fi
@if [ $(shell ./node --version) = "$(VERSION)" ]; then \
exit 0; \
else \