[PATCH 1/3] Tag the first build of each version without the release.
David Lehman
dlehman at redhat.com
Tue Aug 6 19:02:23 UTC 2013
Also sign the tags we create.
So blivet-0.20-1 will get tagged as both blivet-0.20 and blivet-0.20-1,
while blivet-0.20-2 will only get tagged as blivet-0.20-2. This will
give us a direct association between tag and tarball name.
---
Makefile | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 2ecc6ce..0ddd037 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,8 @@ PKGNAME=blivet
SPECFILE=python-blivet.spec
VERSION=$(shell awk '/Version:/ { print $$2 }' $(SPECFILE))
RELEASE=$(shell awk '/Release:/ { print $$2 }' $(SPECFILE) | sed -e 's|%.*$$||g')
-TAG=$(PKGNAME)-$(VERSION)-$(RELEASE)
+RELEASE_TAG=$(PKGNAME)-$(VERSION)-$(RELEASE)
+VERSION_TAG=$(PKGNAME)-$(VERSION)
TX_PULL_ARGS = -a --disable-overwrite
TX_PUSH_ARGS = -s
@@ -30,13 +31,20 @@ ChangeLog:
(GIT_DIR=.git git log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
tag:
- git tag -a -m "Tag as $(TAG)" -f $(TAG)
- @echo "Tagged as $(TAG)"
+ @if test $(RELEASE) = "1" ; then \
+ tags='$(VERSION_TAG) $(RELEASE_TAG)' ; \
+ else \
+ tags='$(RELEASE_TAG)' ; \
+ fi ; \
+ for tag in $$tags ; do \
+ git tag -a -s -m "Tag as $$tag" -f $$tag ; \
+ echo "Tagged as $$tag" ; \
+ done
archive: check tag
@rm -f ChangeLog
@make ChangeLog
- git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(TAG) > $(PKGNAME)-$(VERSION).tar
+ git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(VERSION_TAG) > $(PKGNAME)-$(VERSION).tar
mkdir $(PKGNAME)-$(VERSION)
cp -r po $(PKGNAME)-$(VERSION)
cp ChangeLog $(PKGNAME)-$(VERSION)/
--
1.8.1.4
More information about the anaconda-patches
mailing list