[master 2/2] Add archive target to Makefile
vojtechtrefny
installerbot-noreply at redhat.com
Thu Sep 17 11:24:48 UTC 2015
From: Vojtech Trefny <vtrefny at redhat.com>
Change 'make local' to create a source archive from current code,
add 'make archive' to create a source archive from version tag.
Signed-off-by: Vojtech Trefny <vtrefny at redhat.com>
---
Makefile | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/Makefile b/Makefile
index 8df17e7..c736a31 100644
--- a/Makefile
+++ b/Makefile
@@ -47,18 +47,30 @@ tag:
git tag -a -m "Tag as $(TAG)" -f $(TAG)
@echo "Tagged as $(TAG)"
-archive: tag local
+release: tag archive
-local: po-pull
+archive: po-pull
@rm -f ChangeLog
@make ChangeLog
git archive --format=tar --prefix=$(PKGNAME)-$(VERSION)/ $(TAG) > $(PKGNAME)-$(VERSION).tar
- mkdir -p $(PKGNAME)-$(VERSION)/po
+ mkdir $(PKGNAME)-$(VERSION)
+ cp -r po $(PKGNAME)-$(VERSION)
cp ChangeLog $(PKGNAME)-$(VERSION)/
- cp po/*.po $(PKGNAME)-$(VERSION)/po/
tar -rf $(PKGNAME)-$(VERSION).tar $(PKGNAME)-$(VERSION)
gzip -9 $(PKGNAME)-$(VERSION).tar
rm -rf $(PKGNAME)-$(VERSION)
+ git checkout -- po/$(PKGNAME).pot
+ @echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
+
+local: po-pull
+ @rm -f ChangeLog
+ @make ChangeLog
+ @rm -rf $(PKGNAME)-$(VERSION).tar.gz
+ @rm -rf /tmp/$(PKGNAME)-$(VERSION) /tmp/$(PKGNAME)
+ @dir=$$PWD; cp -a $$dir /tmp/$(PKGNAME)-$(VERSION)
+ @cd /tmp/$(PKGNAME)-$(VERSION) ; $(PYTHON) setup.py -q sdist
+ @cp /tmp/$(PKGNAME)-$(VERSION)/dist/$(PKGNAME)-$(VERSION).tar.gz .
+ @rm -rf /tmp/$(PKGNAME)-$(VERSION)
@echo "The archive is in $(PKGNAME)-$(VERSION).tar.gz"
rpmlog:
--
To view this commit on github, visit https://github.com/rhinstaller/python-meh/commit/58bc1ffa61794e90f9486a04a4aceaf77a902a32
More information about the anaconda-patches
mailing list