aboutsummaryrefslogtreecommitdiffhomepage
path: root/Makefile.local
diff options
context:
space:
mode:
authorGravatar David Bremner <bremner@unb.ca>2011-07-29 17:45:12 +0200
committerGravatar David Bremner <bremner@unb.ca>2011-07-29 18:56:52 +0200
commit839b7f20f620b365c5a918691e8f84095884d2d9 (patch)
tree07bdd92c3f9a8ee94393feda31fdd94d1a88994b /Makefile.local
parent97d090c10567cd66acef8f5402fb635bbbf30a88 (diff)
build-system: Add pre-release target
This is a lighter weight version of the release target, intended to support uploading release candidates to Debian. As a side effect, filter ~ out of VERSION to make tag names.
Diffstat (limited to 'Makefile.local')
-rw-r--r--Makefile.local23
1 files changed, 20 insertions, 3 deletions
diff --git a/Makefile.local b/Makefile.local
index 33fdcc93..e3d4d031 100644
--- a/Makefile.local
+++ b/Makefile.local
@@ -15,11 +15,16 @@ IS_GIT=$(shell if [ -d .git ] ; then echo yes ; else echo no; fi)
VERSION:=$(shell cat ${srcdir}/version)
ifneq ($(MAKECMDGOALS),release)
ifneq ($(MAKECMDGOALS),release-message)
+ifneq ($(MAKECMDGOALS),pre-release)
ifeq ($(IS_GIT),yes)
VERSION:=$(shell git describe --match '[0-9.]*')
endif
endif
endif
+endif
+
+UPSTREAM_TAG=$(subst ~,_,$(VERSION))
+DEB_TAG=debian/$(UPSTREAM_TAG)-1
RELEASE_HOST=notmuchmail.org
RELEASE_DIR=/srv/notmuchmail.org/www/releases
@@ -96,11 +101,11 @@ release: verify-source-tree-and-version
$(MAKE) VERSION=$(VERSION) verify-newer
$(MAKE) VERSION=$(VERSION) clean
$(MAKE) VERSION=$(VERSION) test
- git tag -s -m "$(PACKAGE) $(VERSION) release" $(VERSION)
+ git tag -s -m "$(PACKAGE) $(VERSION) release" $(UPSTREAM_TAG)
$(MAKE) VERSION=$(VERSION) $(GPG_FILE)
ln -sf $(TAR_FILE) $(DEB_TAR_FILE)
- pristine-tar commit $(DEB_TAR_FILE) $(VERSION)
- git tag -s -m "$(PACKAGE) Debian $(VERSION)-1 upload (same as $(VERSION))" debian/$(VERSION)-1
+ pristine-tar commit $(DEB_TAR_FILE) $(UPSTREAM_TAG)
+ git tag -s -m "$(PACKAGE) Debian $(VERSION)-1 upload (same as $(VERSION))" $(DEB_TAG)
mkdir -p releases
mv $(TAR_FILE) $(SHA1_FILE) $(GPG_FILE) releases
$(MAKE) VERSION=$(VERSION) release-message > $(PACKAGE)-$(VERSION).announce
@@ -111,6 +116,18 @@ ifeq ($(REALLY_UPLOAD),yes)
endif
@echo "Please send a release announcement using $(PACKAGE)-$(VERSION).announce as a template."
+.PHONY: pre-release
+pre-release:
+ $(MAKE) VERSION=$(VERSION) clean
+ $(MAKE) VERSION=$(VERSION) test
+ git tag -s -m "$(PACKAGE) $(VERSION) release" $(UPSTREAM_TAG)
+ git tag -s -m "$(PACKAGE) Debian $(VERSION)-1 upload (same as $(VERSION))" $(DEB_TAG)
+ $(MAKE) VERSION=$(VERSION) $(TAR_FILE)
+ ln -sf $(TAR_FILE) $(DEB_TAR_FILE)
+ pristine-tar commit $(DEB_TAR_FILE) $(UPSTREAM_TAG)
+ mkdir -p releases
+ mv $(TAR_FILE) $(DEB_TAR_FILE) releases
+
.PHONY: release-message
release-message:
@echo "To: notmuch@notmuchmail.org"