summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2016-04-12 10:07:29 -0700
committerThiago Macieira <thiago.macieira@intel.com>2016-04-27 08:58:55 +0000
commit728c0f238cce6bca76e14513c036f4cef32e2273 (patch)
tree23dd891cb536467d5aebc181b1a5ce95abcabdba
parent9143a619827bf565effdcf43004749c2e7981939 (diff)
Add "make tagdist" that creates the tag and makes a package
This switches to using "vXXX" tags because: a) standard in the Qt Project b) GitHub strips the 'v' when creating release tarballs Change-Id: Id75834dab9ed466e94c7ffff1444ab9c157eef1b Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
-rw-r--r--Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index e29e704..3d7ae86 100644
--- a/Makefile
+++ b/Makefile
@@ -93,9 +93,16 @@ dist: .git
git archive --prefix="$$name/" -9 --format=tar.gz -o $$name.tar.gz $$rev && \
git archive --prefix="$$name/" -9 --format=zip -v -o $$name.zip $$rev
+tagdist: .git
+ @git describe --exact-match --tags $(HEAD) >/dev/null 2>&1 || { \
+ n=$$(git rev-list --count $(HEAD)) && \
+ echo "Creating tag v$$n" && \
+ git tag -a -m "qtchooser release $$n" v$$n; }
+ $(MAKE) dist
+
distcheck: .git
git archive --prefix=qtchooser-distcheck/ --format=tar $(HEAD) | tar -xf -
cd qtchooser-distcheck && $(MAKE) check
-rm -rf qtchooser-distcheck
-.PHONY: all install uninstall check clean distclean dist
+.PHONY: all install uninstall check clean distclean dist tagdist distcheck