summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Cottlehuber <dch@skunkwerks.at>2018-05-02 09:39:25 +0000
committerJan Lehnardt <jan@apache.org>2018-07-14 12:37:32 +0200
commita82419bb4ac6c6055a1a250bd238c7f4c110c058 (patch)
tree5c2d4b230b99648edbf2e1a3b047c87863f47fa1
parent768e9ebb9c53afcd0da3301841e945b54d0a3b49 (diff)
downloadcouchdb-a82419bb4ac6c6055a1a250bd238c7f4c110c058.tar.gz
build: release candidate tarball should have -RCx
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 727872fbd..27d9531a7 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 --dirty --abbrev=0 --tags --always --first-parent | grep -Eo '^[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)
@@ -292,8 +296,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