[PATCH 6/6] build-system: guard parts irrevokable parts of release target with REALLY_UPLOAD

david at tethera.net david at tethera.net
Mon Jul 4 05:03:41 PDT 2011


From: David Bremner <bremner at debian.org>

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 |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile.local b/Makefile.local
index a291195..6b2a3a7 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -97,12 +97,14 @@ release: verify-source-tree-and-version
 	$(MAKE) VERSION=$(VERSION) test
 	git tag -v $(VERSION) || git tag -s -m "$(PACKAGE) $(VERSION) release" $(VERSION)
 	$(MAKE) VERSION=$(VERSION) $(GPG_FILE)
-	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
-	git push origin $(VERSION)
 	$(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
-- 
1.7.5.4



More information about the notmuch mailing list