[glib-openssl] build: add a helper 'release' target



commit c012bc0e7a3a3e13a893662855f08b6bba5222d1
Author: Paolo Borelli <pborelli gnome org>
Date:   Sat Apr 22 19:22:26 2017 +0200

    build: add a helper 'release' target

 meson.build             |    2 ++
 mesonscripts/release.sh |   20 ++++++++++++++++++++
 2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/meson.build b/meson.build
index aa3b373..340b270 100644
--- a/meson.build
+++ b/meson.build
@@ -124,3 +124,5 @@ subdir('tls/tests')
 subdir('po')
 
 meson.add_install_script(join_paths('mesonscripts', 'post_install.py'))
+
+run_target('release', command: [join_paths('mesonscripts', 'release.sh'), meson.project_name(), 
meson.project_version()])
diff --git a/mesonscripts/release.sh b/mesonscripts/release.sh
new file mode 100755
index 0000000..6fc6d33
--- /dev/null
+++ b/mesonscripts/release.sh
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+NAME="$1"
+VERSION="$2"
+
+test -n "${MESON_SOURCE_ROOT}" || exit 1
+test -n "${NAME}" || exit 1
+test -n "${VERSION}" || exit 1
+
+cd "${MESON_SOURCE_ROOT}"
+
+echo "Removing old archive…"
+rm -f "${NAME}-${VERSION}.tar"
+rm -f "${NAME}-${VERSION}.tar.xz"
+
+echo "Creating git archive…"
+git archive --prefix="${NAME}-${VERSION}/" --format=tar HEAD -o ${NAME}-${VERSION}.tar
+
+echo "Compressing archive…"
+xz -f "${NAME}-${VERSION}.tar"


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