[SSSD] [PATCH] ding-libs: Add a release script

Jakub Hrozek jhrozek at redhat.com
Thu Mar 28 15:59:54 UTC 2013


This patch adds a convenience script for generating sssd tarballs based
on a similar script from the SSSD.

To test the script with recent autoconf, the tag being released must include
recent commits for ding-libs to allow autoreconf to run cleanly.
-------------- next part --------------
>From a76b509c1464469715bf0fe4b0c9cc913d143167 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Thu, 28 Mar 2013 16:31:03 +0100
Subject: [PATCH] Add a release script

---
 scripts/release.sh | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
 create mode 100755 scripts/release.sh

diff --git a/scripts/release.sh b/scripts/release.sh
new file mode 100755
index 0000000000000000000000000000000000000000..4730cda6b12afda82ca0476a318c0980c537b952
--- /dev/null
+++ b/scripts/release.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+function config()
+{
+    autoreconf -i -f || return $?
+    ./configure
+}
+
+SAVED_PWD=$PWD
+version=`grep '\[VERSION_NUMBER], \[.*\]' version.m4 |grep '[0-9]\+\.[0-9]\+\.[0-9]\+' -o`
+tag=$(echo ${version} | tr "." "_")
+
+trap "cd $SAVED_PWD; rm -rf ding-libs-${version} ding-libs-${version}.tar" EXIT
+
+git archive --format=tar --prefix=ding-libs-${version}/ ding_libs-${tag} > ding-libs-${version}.tar
+if [ $? -ne 0 ]; then
+    echo "Cannot perform git-archive, check if tag ding_libs-$tag is present in git tree"
+    exit 1
+fi
+tar xf ding-libs-${version}.tar
+
+pushd ding-libs-${version}
+config || exit 1
+make dist-gzip || exit 1  # also builds docs
+popd
+
+mv ding-libs-${version}/ding-libs-${version}.tar.gz .
+gpg --detach-sign --armor ding-libs-${version}.tar.gz
+
-- 
1.8.1.4



More information about the sssd-devel mailing list