summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Lehnardt <jan@apache.org>2016-07-20 22:16:37 +0200
committerJan Lehnardt <jan@apache.org>2016-07-20 22:16:37 +0200
commit9b7511a84fe9f057454487f6e48fa33cd561efc1 (patch)
treea1b0484531c5182489ff3785d8791bf514627d56
parentb68e094392d11c319d40c7119f11f4f3f463bb42 (diff)
downloadcouchdb-9b7511a84fe9f057454487f6e48fa33cd561efc1.tar.gz
feat: add `make rc` target. Requires `COUCH_RC` env var set to an int.
Example: ./configure COUCH_RC=2 make rc # produces `apache-couchdb-2.0.0-RC2.tar.gz Extracts into a directory called `apache-couchdb-2.0.0-RC2`. Set `COUCH_RC=3` for RC3 and so on. Bails with an hopefully helpful error message if `COUCH_RC` is not set.
-rw-r--r--Makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 99483720c..11b3267ca 100644
--- a/Makefile
+++ b/Makefile
@@ -331,6 +331,17 @@ uninstall:
@rm -rf $(DESTDIR)/$(man_dir)
@rm -rf $(DESTDIR)/$(info_dir)
+.PHONY: rc
+rc:
+ifeq ($(strip $(COUCH_RC)),)
+ @echo "COUCH_RC environment variable not set. Run as 'COUCH_RC=X make rc'"
+else
+ @rm -rf apache-couchdb-*
+ @$(MAKE) dist
+ @rm apache-couchdb-*.tar.gz
+ @mv apache-couchdb-* apache-couchdb-2.0.0-RC$(COUCH_RC)
+ @tar czf apache-couchdb-2.0.0-RC$(COUCH_RC).tar.gz apache-couchdb-2.0.0-RC$(COUCH_RC)
+endif
################################################################################
# Misc