diff options
author | Nathan Rajlich <nathan@tootallnate.net> | 2012-08-04 15:34:04 -0700 |
---|---|---|
committer | Nathan Rajlich <nathan@tootallnate.net> | 2012-08-06 11:41:45 -0700 |
commit | dc818135a573fa35a502417322e811f20e488e4c (patch) | |
tree | 775d12006c1afc7269c4720f28186e33cc28aa2b | |
parent | 8b11f29cf3881cdc0e1e1a553c543f561128daed (diff) | |
download | node-new-dc818135a573fa35a502417322e811f20e488e4c.tar.gz |
Makefile: move the release verification logic into a `make release-only` target
-rw-r--r-- | Makefile | 50 |
1 files changed, 26 insertions, 24 deletions
@@ -213,9 +213,31 @@ dist: doc $(TARBALL) $(PKG) PKGDIR=out/dist-osx +release-only: + @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 \ + echo "" >&2 ; \ + echo "$(shell ./node --version) doesn't match $(VERSION)." >&2 ; \ + echo "Did you remember to update src/node_version.cc?" >&2 ; \ + echo "" >&2 ; \ + exit 1 ; \ + fi + pkg: $(PKG) -$(PKG): +$(PKG): release-only rm -rf $(PKGDIR) rm -rf out/deps out/Release ./configure --prefix=$(PKGDIR)/32/usr/local --without-snapshot --dest-cpu=ia32 @@ -236,27 +258,7 @@ $(PKG): --out $(PKG) SIGN="$(SIGN)" PKG="$(PKG)" bash tools/osx-productsign.sh -$(TARBALL): node 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 \ - echo "" >&2 ; \ - echo "$(shell ./node --version) doesn't match $(VERSION)." >&2 ; \ - echo "Did you remember to update src/node_version.cc?" >&2 ; \ - echo "" >&2 ; \ - exit 1 ; \ - fi +$(TARBALL): release-only node doc git archive --format=tar --prefix=$(TARNAME)/ HEAD | tar xf - mkdir -p $(TARNAME)/doc/api cp doc/node.1 $(TARNAME)/doc/node.1 @@ -270,7 +272,7 @@ $(TARBALL): node doc tar: $(TARBALL) -$(BINARYTAR): +$(BINARYTAR): release-only rm -rf $(BINARYNAME) rm -rf out/deps out/Release ./configure --prefix=/ --without-snapshot --dest-cpu=$(DESTCPU) @@ -308,4 +310,4 @@ cpplint: lint: jslint cpplint -.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all staticlib dynamiclib test test-all website-upload pkg blog blogclean tar binary +.PHONY: lint cpplint jslint bench clean docopen docclean doc dist distclean check uninstall install install-includes install-bin all staticlib dynamiclib test test-all website-upload pkg blog blogclean tar binary release-only |