diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2017-03-13 17:35:36 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2017-03-13 17:35:36 +0000 |
commit | 47f702ec48dd6f910544c6a73c2ed24377539bab (patch) | |
tree | e9424dc733324b3deef395df40868a3993b90685 | |
parent | 570be9efa3d91a7e4678dc0134101d87b41b29e6 (diff) | |
download | json-glib-wip/drop-autotools.tar.gz |
Add script to generate a dist tarballwip/drop-autotools
Even if we don't use Autotools we may still need to generate a dist
tarball from a Git tag.
-rw-r--r-- | .gitattributes | 6 | ||||
-rwxr-xr-x | 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" |