summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThiago Macieira <thiago.macieira@intel.com>2012-12-18 10:28:18 -0800
committerThiago Macieira <thiago.macieira@intel.com>2012-12-19 09:03:05 +0100
commit0c01e74470a1b467a9814fef979fe77fd3aeb0c4 (patch)
treec4b3abcf1170ede8294fe2c33097ab309817ddef
parent58b7e16dbf62f49e247ec73e0a4d82e16d8d38b1 (diff)
Add the necessary files to create a package with git archiveqtchooser-6-g0c01e74
Change-Id: Ice29268ab455d14deb793440431be94f2a80f187 Reviewed-by: Lars Knoll <lars.knoll@digia.com>
-rw-r--r--.gitattributes3
-rw-r--r--.tag1
-rw-r--r--Makefile12
3 files changed, 15 insertions, 1 deletions
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..018cf2c
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,3 @@
+.tag export-subst
+.gitignore export-ignore
+.gitattributes export-ignore
diff --git a/.tag b/.tag
new file mode 100644
index 0000000..6828f88
--- /dev/null
+++ b/.tag
@@ -0,0 +1 @@
+$Format:%H$
diff --git a/Makefile b/Makefile
index 7f8eaf4..1b93597 100644
--- a/Makefile
+++ b/Makefile
@@ -60,4 +60,14 @@ check: tests/auto/Makefile
cd src/qtchooser && $(MAKE) check
cd tests/auto && $(MAKE) check
-.PHONY: all install uninstall check clean distclean
+dist: .git
+ @ \
+ { rev=$$(git describe --tags HEAD 2>/dev/null) && \
+ name=qtchooser-$${rev#v}; } || \
+ { rev=$$(git rev-parse --short HEAD) && \
+ name=qtchooser-$$(git rev-list HEAD | wc -l)-g$$rev; } && \
+ echo "Creating package $$name" >&2 && \
+ 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
+
+.PHONY: all install uninstall check clean distclean dist