summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2009-05-21 12:31:58 +0200
committerSimo Sorce <ssorce@redhat.com>2009-05-26 11:26:09 -0400
commitee2f522ebd4ded82f5ce46ff27a66a14cfce8274 (patch)
tree85aec5974a02ef91e4475d39de71f7c8a0a04119 /scripts
parenta3888d4941aaf3903c2406f739dd8cd9ed836dad (diff)
downloadsssd-ee2f522ebd4ded82f5ce46ff27a66a14cfce8274.tar.gz
sssd-ee2f522ebd4ded82f5ce46ff27a66a14cfce8274.tar.bz2
sssd-ee2f522ebd4ded82f5ce46ff27a66a14cfce8274.zip
Fix release.sh
Fix version extraction in release script Use make dist-gzip inside of git-archived directory
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/release.sh27
1 files changed, 24 insertions, 3 deletions
diff --git a/scripts/release.sh b/scripts/release.sh
index e49bd8de..93b6c16c 100755
--- a/scripts/release.sh
+++ b/scripts/release.sh
@@ -1,8 +1,29 @@
#!/bin/bash
-version=`grep "^AC_INIT" server/configure.ac | tr -d "AC_INIT(sssd, " | tr -d ")"`
-v_=`echo ${version} | tr "." "_"`
+function config()
+{
+ autoreconf -i -f || return $?
+ ./configure
+}
-git archive --format=tar --prefix=sssd-${version}/ sssd-${v_} | gzip > sssd-${version}.tar.gz
+SAVED_PWD=$PWD
+version=$(grep "^AC_INIT" configure.ac | grep -E -o \[[0-9.]+\] | tr -d [])
+tag=$(echo ${version} | tr "." "_")
+
+trap "cd $SAVED_PWD; rm -rf sssd-${version} sssd-${version}.tar" EXIT
+
+git archive --format=tar --prefix=sssd-${version}/ sssd-${tag} > sssd-${version}.tar
+if [ $? -ne 0 ]; then
+ echo "Cannot perform git-archive, check if tag $tag is present in git tree"
+ exit 1
+fi
+tar xf sssd-${version}.tar
+
+pushd sssd-${version}
+config || exit 1
+make dist-gzip || exit 1 # also builds docs
+popd
+
+mv sssd-${version}/sssd-${version}.tar.gz .
gpg --detach-sign --armor sssd-${version}.tar.gz