diff options
author | Brian Coca <bcoca@ansible.com> | 2015-07-29 01:17:30 +0200 |
---|---|---|
committer | Brian Coca <bcoca@ansible.com> | 2015-07-29 01:17:30 +0200 |
commit | 7a019d930e65670d5379a939c104f0c7b602bdc8 (patch) | |
tree | 981c4465bf9d38f346dc972d5e37538db9338a21 /Makefile | |
parent | show role search path when not finding a role (diff) | |
parent | packaging: add short has and branch name in package version for unofficial bu... (diff) | |
download | ansible-7a019d930e65670d5379a939c104f0c7b602bdc8.tar.xz ansible-7a019d930e65670d5379a939c104f0c7b602bdc8.zip |
Merge pull request #8469 from srvg/packageversion_more_gitinfo
packaging: add short hash and branch name in package version for unoffici...
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -40,6 +40,11 @@ RELEASE := $(shell cat VERSION | cut -f2 -d' ') # Get the branch information from git ifneq ($(shell which git),) GIT_DATE := $(shell git log -n 1 --format="%ai") +GIT_HASH := $(shell git log -n 1 --format="%h") +GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD | sed 's/[-_.]//g') +GITINFO = .$(GIT_HASH).$(GIT_BRANCH) +else +GITINFO = '' endif ifeq ($(shell echo $(OS) | egrep -c 'Darwin|FreeBSD|OpenBSD'),1) @@ -62,7 +67,7 @@ ifeq ($(OFFICIAL),yes) DEBUILD_OPTS += -k$(DEBSIGN_KEYID) endif else - DEB_RELEASE = 0.git$(DATE) + DEB_RELEASE = 0.git$(DATE)$(GITINFO) # Do not sign unofficial builds DEBUILD_OPTS += -uc -us DPUT_OPTS += -u @@ -78,7 +83,7 @@ RPMSPEC = $(RPMSPECDIR)/ansible.spec RPMDIST = $(shell rpm --eval '%{?dist}') RPMRELEASE = $(RELEASE) ifneq ($(OFFICIAL),yes) - RPMRELEASE = 0.git$(DATE) + RPMRELEASE = 0.git$(DATE)$(GITINFO) endif RPMNVR = "$(NAME)-$(VERSION)-$(RPMRELEASE)$(RPMDIST)" |