diff options
author | Dave Cottlehuber <dch@skunkwerks.at> | 2018-05-02 08:13:33 +0000 |
---|---|---|
committer | Dave Cottlehuber <dch@skunkwerks.at> | 2018-05-02 08:16:12 +0000 |
commit | 50af2cb9e38355085a7510d964af4bc6df2433c2 (patch) | |
tree | e841662c793df0123e0509f5c7d42ed799c61438 | |
parent | 369d41bf37585ca72cd0f993e0db9e5fc75f3dfd (diff) | |
download | couchdb-50af2cb9e38355085a7510d964af4bc6df2433c2.tar.gz |
build: ease pattern matching to be less pedantic about RC
git-describe may have changed output formats. The previous regex doesn't
allow any trailing content, and git-describe always appends -g<SHA> unless
abbrev=0 is added.
This approach pulls out only the matching tag, leaving behind any
trailing garbage from git-describe, and as a bonus allows tagging a
commit from within a branch, and running a release directly from the
branch without needing to re-check out the tag itself.
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -17,7 +17,7 @@ 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]+)?$$') +RELTAG = $(shell git describe --dirty --abbrev=0 --tags --always --first-parent | grep -Eo '^[0-9]+\.[0-9]\.[0-9]+(-RC[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) |