Skip to content

Commit

Permalink
Revert "Packaging: persistent TIMESTAMP"
Browse files Browse the repository at this point in the history
This reverts commit 497b2a6.
  • Loading branch information
vojtechsokol committed Nov 30, 2018
1 parent eb4615e commit 8cdcc69
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ MASTER_BRANCH=master
# upstream solution). For upstream builds N_REL=1;
N_REL=`_NR=$${PR:+0}; if test "$${_NR:-1}" == "1"; then _NR=$${MR:+0}; fi; git rev-parse --abbrev-ref HEAD | grep -qE "^($(MASTER_BRANCH)|stable)$$" || _NR=0; echo $${_NR:-1}`
_TIMESTAMP=$${TIMESTAMP:-`date +%Y%m%d%H%MZ -u`}
TIMESTAMP=`date +%Y%m%d%H%MZ -u`
SHORT_SHA=`git rev-parse --short HEAD`
BRANCH=`git rev-parse --abbrev-ref HEAD | tr '-' '_'`
Expand All @@ -33,7 +33,7 @@ REQUEST=`if test -n "$$PR"; then echo ".PR$${PR}"; elif test -n "$$MR"; then ech
# 0.201810080027Z.4078402.packaging
# 0.201810080027Z.4078402.master.MR2
# 1.201810080027Z.4078402.master
RELEASE="$(N_REL).$(_TIMESTAMP).$(SHORT_SHA).$(BRANCH)$(REQUEST)$(_SUFFIX)"
RELEASE="$(N_REL).$(TIMESTAMP).$(SHORT_SHA).$(BRANCH)$(REQUEST)$(_SUFFIX)"
all: help
Expand Down Expand Up @@ -61,13 +61,7 @@ help:
@echo " MR=6 COPR_CONFIG='path/to/the/config/copr/file' <target>"
@echo ""
# To ensure the TIMESTAMP will be same during the whole process, call the make
# again with the expected parameters and with the set TIMESTAMP. By this magic
# the TIMESTAMP will not be changed, even when some commands takes minutes.
_remake:
@if test -z "$$TIMESTAMP"; then TIMESTAMP=$(_TIMESTAMP) $(MAKE) $@; exit 0; fi
clean: _remake
clean:
@echo "--- Clean repo ---"
@rm -rf packaging/{sources,SRPMS,tmp}/
@rm -rf build/ dist/ *.egg-info
Expand Down Expand Up @@ -131,7 +125,7 @@ copr_build: srpm
@copr --config $(_COPR_CONFIG) build $(_COPR_REPO) \
packaging/SRPMS/${PKGNAME}-${VERSION}-${RELEASE}*.src.rpm
print_release: _remake
print_release:
@echo $(RELEASE)
# Before doing anything, it is good idea to register repos to ensure everything
Expand Down

0 comments on commit 8cdcc69

Please sign in to comment.