This is an automated email from the ASF dual-hosted git repository.

jan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit a82419bb4ac6c6055a1a250bd238c7f4c110c058
Author: Dave Cottlehuber <[email protected]>
AuthorDate: Wed May 2 09:39:25 2018 +0000

    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.
---
 Makefile | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 727872f..27d9531 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

Reply via email to