summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2017-08-03 12:35:37 -0700
committerGitHub <noreply@github.com>2017-08-03 12:35:37 -0700
commitb54d00f2defafc5d1daa67279477c2e9b9b729e0 (patch)
tree11e24fdc2cab377e1ff2f68f05e85dfea4a7f8aa /Makefile
parent96784160b1d9b2233107a9135bcaab1c134330cd (diff)
downloadansible-b54d00f2defafc5d1daa67279477c2e9b9b729e0.tar.gz
Update RPM spec and make targets. (#27712)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile10
1 files changed, 7 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index f7c7e15213..07b75439b1 100644
--- a/Makefile
+++ b/Makefile
@@ -93,6 +93,10 @@ RPMRELEASE = $(RELEASE)
ifneq ($(OFFICIAL),yes)
RPMRELEASE = 100.git$(DATE)$(GITINFO)
endif
+ifeq ($(PUBLISH),nightly)
+ # https://fedoraproject.org/wiki/Packaging:Versioning#Snapshots
+ RPMRELEASE = $(RELEASE).$(DATE)git.$(GIT_HASH)
+endif
RPMNVR = "$(NAME)-$(VERSION)-$(RPMRELEASE)$(RPMDIST)"
# MOCK build parameters
@@ -201,17 +205,17 @@ sdist_upload: clean docs
rpmcommon: sdist
@mkdir -p rpm-build
@cp dist/*.gz rpm-build/
- @sed -e 's#^Version:.*#Version: $(VERSION)#' -e 's#^Release:.*#Release: $(RPMRELEASE)%{?dist}#' $(RPMSPEC) >rpm-build/$(NAME).spec
+ @sed -e 's#^Version:.*#Version: $(VERSION)#' -e 's#^Release:.*#Release: $(RPMRELEASE)%{?dist}$(REPOTAG)#' $(RPMSPEC) >rpm-build/$(NAME).spec
mock-srpm: /etc/mock/$(MOCK_CFG).cfg rpmcommon
- $(MOCK_BIN) -r $(MOCK_CFG) --resultdir rpm-build/ --buildsrpm --spec rpm-build/$(NAME).spec --sources rpm-build/
+ $(MOCK_BIN) -r $(MOCK_CFG) $(MOCK_ARGS) --resultdir rpm-build/ --buildsrpm --spec rpm-build/$(NAME).spec --sources rpm-build/
@echo "#############################################"
@echo "Ansible SRPM is built:"
@echo rpm-build/*.src.rpm
@echo "#############################################"
mock-rpm: /etc/mock/$(MOCK_CFG).cfg mock-srpm
- $(MOCK_BIN) -r $(MOCK_CFG) --resultdir rpm-build/ --rebuild rpm-build/$(NAME)-*.src.rpm
+ $(MOCK_BIN) -r $(MOCK_CFG) $(MOCK_ARGS) --resultdir rpm-build/ --rebuild rpm-build/$(NAME)-*.src.rpm
@echo "#############################################"
@echo "Ansible RPM is built:"
@echo rpm-build/*.noarch.rpm