[json-glib] Add script to generate a dist tarball



commit 9ce6c35d1e9a08ec9c18316300ae0e5b369172c1
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Mar 13 17:35:36 2017 +0000

    Add script to generate a dist tarball
    
    Even if we don't use Autotools we may still need to generate a dist
    tarball from a Git tag.

 .gitattributes  |    6 ++++++
 make_release.sh |   20 ++++++++++++++++++++
 2 files changed, 26 insertions(+), 0 deletions(-)
---
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..fffe69f
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,6 @@
+.gitattributes          export-ignore
+.gitignore              export-ignore
+
+json-glib.doap          export-ignore
+
+make_release.sh         export-ignore
diff --git a/make_release.sh b/make_release.sh
new file mode 100755
index 0000000..6d5727a
--- /dev/null
+++ b/make_release.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+test -n "$srcdir" || srcdir=$(dirname "$0")
+test -n "$srcdir" || srcdir=.
+
+cd $srcdir
+
+PROJECT=json-glib
+VERSION=$(git describe --abbrev=0)
+
+grep "version: '${VERSION}'" meson.build || { echo "*** Missing version bump (required version: ${VERSION}) 
***"; exit 1; }
+
+NAME="${PROJECT}-${VERSION}"
+
+rm -f "${NAME}.tar"
+
+echo "Creating git tree archiveā€¦"
+git archive --prefix="${NAME}/" --format=tar HEAD > ${NAME}.tar
+
+echo "Compressing archiveā€¦"
+xz -f "${NAME}.tar"


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