summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToshio Kuratomi <a.badger@gmail.com>2019-07-24 08:40:03 -0700
committerToshio Kuratomi <a.badger@gmail.com>2019-07-24 10:03:48 -0700
commit7fc75e54e686358c3fa9f49ce55b27cfaf7f163c (patch)
tree245bb110f51c80738ff13dcd2d1f2739136e3040
parent240457994605471faca1fc8e3d3b0266af866c83 (diff)
downloadansible-7fc75e54e686358c3fa9f49ce55b27cfaf7f163c.tar.gz
[stable-2.6] Fix nightly rpm release
The nightly rpm builds were using a timestamp from the last git commit in their Release field. Unfortunately, that was using author timestamp which is nonsequential. Change to using commit timestamp which is sequential. note that this still has a cornercase if the branch's history is ever rewritten. (cherry picked from commit 97edfcc) Co-authored-by: Toshio Kuratomi <a.badger@gmail.com>
-rw-r--r--Makefile4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a7d21b3a60..3b23b43cf8 100644
--- a/Makefile
+++ b/Makefile
@@ -48,7 +48,7 @@ RELEASE ?= 1
# Get the branch information from git
ifneq ($(shell which git),)
-GIT_DATE := $(shell git log -n 1 --format="%ai")
+GIT_DATE := $(shell git log -n 1 --format="%ci")
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)
@@ -57,7 +57,7 @@ GITINFO = ""
endif
ifeq ($(shell echo $(OS) | egrep -c 'Darwin|FreeBSD|OpenBSD|DragonFly'),1)
-DATE := $(shell date -j -r $(shell git log -n 1 --format="%at") +%Y%m%d%H%M)
+DATE := $(shell date -j -r $(shell git log -n 1 --format="%ct") +%Y%m%d%H%M)
CPUS ?= $(shell sysctl hw.ncpu|awk '{print $$2}')
else
DATE := $(shell date --utc --date="$(GIT_DATE)" +%Y%m%d%H%M)