[PATCH] Add the testbuild target to the Makefile.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This allows the person who is building anaconda to test if the build actually works
before doing anything else.  The testbuild target doesn't create a tag, so this
should further prevent tagging misshaps from occuring.  This will add an optional
step (testbuild) to the build workflow.  This change uses brew's --scratch option
to test the build on all the archs.
Building locally is possible but the testbuild target makes the process easier and
more thorough.
---
 Makefile |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 803e963..715600b 100644
--- a/Makefile
+++ b/Makefile
@@ -102,11 +102,18 @@ src: create-archive
 build: src
 	@rm -rf /tmp/anaconda
 	@mkdir /tmp/anaconda
-	cd /tmp/anaconda ; cvs co common ; cd common ; ./cvs-import.sh -b RHEL-5 $(SRPMDIR)/anaconda-$(VERSION)-$(RELEASE).src.rpm
+	cd /tmp/anaconda ; cvs co common ; cd common ; ./cvs-import.sh -b RHEL-5 $(SRPMDIR)/$(TAG).src.rpm
 	@rm -rf /tmp/anaconda
 	brew build $(COLLECTION) 'cvs://cvs.devel.redhat.com/cvs/dist?anaconda/RHEL-5#$(TAG)'
 
-create-snapshot: ChangeLog tag
+testbuild:
+	@make create-snapshot ; \
+	rpmbuild -ts --nodeps anaconda-$(VERSION).tar.bz2 || exit 1 ; \
+	td=`rpm --eval "%_topdir"`; \
+	brew build --scratch dist-5E-build $$td/SRPMS/$(TAG).src.rpm ; \
+	rm -f anaconda-$(VERSION).tar.bz2
+
+create-snapshot: ChangeLog
 	@git-archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(TAG) > anaconda-$(VERSION).tar
 	@mkdir -p anaconda-$(VERSION)/
 	@cp ChangeLog anaconda-$(VERSION)/
@@ -115,7 +122,7 @@ create-snapshot: ChangeLog tag
 	@rm -rf anaconda-$(VERSION)
 	@echo "The final archive is in anaconda-$(VERSION).tar.bz2"
 
-create-archive:
+create-archive: tag
 	make create-snapshot
 
 pycheck:
-- 
1.5.4.1

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux