[master 3/3] Add rc-release target

bcl installerbot-noreply at redhat.com
Fri Mar 6 17:50:46 UTC 2015


From: "Brian C. Lane" <bcl at redhat.com>

Use these make targets for creating scratch rc builds that can be used
before an official release. rc-release will run scratch-bumpver to bump
the version and add a rc release with the current date and time to the
specfile.  scratch is then run to create the tar.gz file and then mock
is used to build a rc rpm package.

No changes are committed to git, no zanata account is required and
nothing is pushed to zanata.

This also Modifes scratch-bumpver to now include the rc release number.

This requires that mock is installed and the current user is a member of
the mock group.

Build the rc like this:
git clean -xdf
git reset --hard
./autogen.sh
./configure --disable-static --enable-introspection --enable-gtk-doc
make rc-release

If everything goes well there will be a pile of rpms in the current
directory.
---
 Makefile.am | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Makefile.am b/Makefile.am
index 8446ac7..a7d0596 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -47,6 +47,9 @@ ARCHIVE_TAG   = $(PACKAGE_NAME)-$(PACKAGE_VERSION)-$(PACKAGE_RELEASE)
 ZANATA_PULL_ARGS = --transdir $(srcdir)/po/
 ZANATA_PUSH_ARGS = --srcdir $(srcdir)/po/ --push-type source --force
 
+RC_RELEASE ?= $(shell date -u +0.1.%Y%m%d%H%M%S)
+MOCKCHROOT ?= fedora-rawhide-x86_64
+
 tag:
 	@git tag -s -a -m "Tag as $(ARCHIVE_TAG)" $(ARCHIVE_TAG)
 	@echo "Tagged as $(ARCHIVE_TAG)"
@@ -67,7 +70,7 @@ scratch: po-empty
 	git checkout -- $(srcdir)/po/$(PACKAGE_NAME).pot
 
 scratch-bumpver: po-empty
-	@opts="-S -n $(PACKAGE_NAME) -v $(PACKAGE_VERSION) -r $(PACKAGE_RELEASE) -b $(PACKAGE_BUGREPORT)" ; \
+	@opts="-S -n $(PACKAGE_NAME) -v $(PACKAGE_VERSION) -r $(PACKAGE_RELEASE) -b $(PACKAGE_BUGREPORT) --newrelease $(RC_RELEASE)" ; \
 	if [ ! -z "$(IGNORE)" ]; then \
 		opts="$${opts} -i $(IGNORE)" ; \
 	fi ; \
@@ -83,6 +86,12 @@ scratch-bumpver: po-empty
 release:
 	$(MAKE) dist && $(MAKE) tag && git checkout -- $(srcdir)/po/$(PACKAGE_NAME).pot
 
+rc-release: scratch-bumpver scratch
+	mock -r $(MOCKCHROOT) --buildsrpm  --spec ./$(PACKAGE_NAME).spec --sources . || exit 1
+	cp /var/lib/mock/$(MOCKCHROOT)/result/*src.rpm . || exit 1
+	mock -r $(MOCKCHROOT) --rebuild *src.rpm || exit 1
+	cp /var/lib/mock/$(MOCKCHROOT)/result/*.rpm . || exit 1
+
 bumpver: po-pull
 	@opts="-n $(PACKAGE_NAME) -v $(PACKAGE_VERSION) -r $(PACKAGE_RELEASE) -b $(PACKAGE_BUGREPORT)" ; \
 	if [ ! -z "$(IGNORE)" ]; then \


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/15cdeae4c88cca21a2def61293d3983a2b4f0ba6


More information about the anaconda-patches mailing list