]> git.notmuchmail.org Git - notmuch/commitdiff
build-system: guard parts irrevokable parts of release target with REALLY_UPLOAD
authorDavid Bremner <bremner@debian.org>
Mon, 4 Jul 2011 11:39:04 +0000 (08:39 -0300)
committerDavid Bremner <bremner@debian.org>
Sun, 17 Jul 2011 13:59:41 +0000 (10:59 -0300)
This supports both testing and use by non-upload privileged
users. Along with previous commits in the series, this lets one do a
dry run of the release process and created a tarball, signature file,
and release announcement to inspect before uploading.

Makefile.local

index 7fc68163f9858af52bc5fba70c5df14184b0fa7f..2acc9d3a1d658f800317755cb95e232e66928acd 100644 (file)
@@ -100,12 +100,14 @@ release: verify-source-tree-and-version
        $(MAKE) VERSION=$(VERSION) $(GPG_FILE)
        ln -sf $(TAR_FILE) $(DEB_TAR_FILE)
        pristine-tar commit $(DEB_TAR_FILE) $(VERSION)
        $(MAKE) VERSION=$(VERSION) $(GPG_FILE)
        ln -sf $(TAR_FILE) $(DEB_TAR_FILE)
        pristine-tar commit $(DEB_TAR_FILE) $(VERSION)
-       scp $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) $(RELEASE_HOST):$(RELEASE_DIR)
-       ssh $(RELEASE_HOST) "rm -f $(RELEASE_DIR)/LATEST-$(PACKAGE)-[0-9]* && ln -s $(TAR_FILE) $(RELEASE_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
        mkdir -p releases
        mv $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) releases
        mkdir -p releases
        mv $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) releases
-       git push origin $(VERSION)
        $(MAKE) VERSION=$(VERSION) release-message > $(PACKAGE)-$(VERSION).announce
        $(MAKE) VERSION=$(VERSION) release-message > $(PACKAGE)-$(VERSION).announce
+ifeq ($(REALLY_UPLOAD),yes)
+       git push origin $(VERSION)
+       cd releases && scp $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) $(RELEASE_HOST):$(RELEASE_DIR)
+       ssh $(RELEASE_HOST) "rm -f $(RELEASE_DIR)/LATEST-$(PACKAGE)-[0-9]* ; ln -s $(TAR_FILE) $(RELEASE_DIR)/LATEST-$(PACKAGE)-$(VERSION)"
+endif
        @echo "Please send a release announcement using $(PACKAGE)-$(VERSION).announce as a template."
 
 .PHONY: release-message
        @echo "Please send a release announcement using $(PACKAGE)-$(VERSION).announce as a template."
 
 .PHONY: release-message