summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Cottlehuber <dch@skunkwerks.at>2018-05-02 09:39:25 +0000
committerJoan Touzet <joant@atypical.net>2018-07-08 20:02:42 +0000
commit2b488d06f006f2923bf362335fee47603de81801 (patch)
tree5dc82104aae647f2fea92304d1f9a17146357b2a
parentebfd6ed0c23d8a32f3b175ff6aa8b144ea47f209 (diff)
downloadcouchdb-2b488d06f006f2923bf362335fee47603de81801.tar.gz
build: release candidate tarball should have -RCx2.1.2-RC7
the released tarball should have -RCx in the name, but not in the extracted file, otherwise we can't simply rename the final artefact for our public release.
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index d56d4e897..18e198439 100644
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,11 @@ IN_RELEASE = $(shell if [ ! -d .git ]; then echo true; fi)
ifeq ($(IN_RELEASE), true)
COUCHDB_VERSION = $(vsn_major).$(vsn_minor).$(vsn_patch)
else
-RELTAG = $(shell git describe | grep -E '^[0-9]+\.[0-9]\.[0-9]+(-RC[0-9]+)?$$')
+# IN_RC generates a tarball that has the -RCx suffix in the name if needed
+IN_RC = $(shell git describe --tags --always --first-parent \
+ | grep -Eo -- '-RC[0-9]+' 2>/dev/null)
+RELTAG = $(shell git describe --dirty --abbrev=0 --tags --always --first-parent \
+ | grep -Eo '^[0-9]+\.[0-9]\.[0-9]+')
ifeq ($(RELTAG),)
COUCHDB_VERSION_SUFFIX = $(shell git rev-parse --short --verify HEAD)
COUCHDB_VERSION = $(vsn_major).$(vsn_minor).$(vsn_patch)-$(COUCHDB_VERSION_SUFFIX)
@@ -289,8 +293,8 @@ dist: all
@mkdir -p apache-couchdb-$(COUCHDB_VERSION)/share/docs/man
@cp src/docs/build/man/apachecouchdb.1 apache-couchdb-$(COUCHDB_VERSION)/share/docs/man/
- @tar czf apache-couchdb-$(COUCHDB_VERSION).tar.gz apache-couchdb-$(COUCHDB_VERSION)
- @echo "Done: apache-couchdb-$(COUCHDB_VERSION).tar.gz"
+ @tar czf apache-couchdb-$(COUCHDB_VERSION)$(IN_RC).tar.gz apache-couchdb-$(COUCHDB_VERSION)
+ @echo "Done: apache-couchdb-$(COUCHDB_VERSION)$(IN_RC).tar.gz"
.PHONY: release