From 47f702ec48dd6f910544c6a73c2ed24377539bab Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Mon, 13 Mar 2017 17:35:36 +0000 Subject: 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(+) create mode 100644 .gitattributes create mode 100755 make_release.sh 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" -- cgit v1.2.1