[nautilus-actions] Release tool: fix remote install of the tarball
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] Release tool: fix remote install of the tarball
- Date: Wed, 22 Dec 2010 22:16:59 +0000 (UTC)
commit 4b1478bf7810e16c36724d0689f93e9d4cd29f63
Author: Pierre Wieser <pwieser trychlos org>
Date: Wed Dec 22 23:10:53 2010 +0100
Release tool: fix remote install of the tarball
ChangeLog | 4 +++
docs/reference/version_dir.xml | 1 -
tools/release-tarball.sh | 46 +++++++++++++++++++++++++++------------
3 files changed, 36 insertions(+), 15 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index ed6ce70..5c188e5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-12-22 Pierre Wieser <pwieser trychlos org>
+
+ * tools/release-tarball.sh: Fix remote install of the tarball.
+
2010-12-20 Pierre Wieser <pwieser trychlos org>
* configure.ac: Post-release bump version.
diff --git a/tools/release-tarball.sh b/tools/release-tarball.sh
index 52cf6cd..ba625b0 100755
--- a/tools/release-tarball.sh
+++ b/tools/release-tarball.sh
@@ -2,10 +2,13 @@
#
# Release a new Nautilus-Actions version
#
-# (E): 1. (opt) "stable" will update the latest.tar.gz links
-if [ ! -f Makefile ]; then
- echo "Makefile not found, probably not the good current directory" 1>&2
+if [ ! -f configure.ac ]; then
+ echo "configure.ac not found, probably not the good current directory" 1>&2
+ exit 1
+fi
+if [ "$(basename $(pwd))" != "nautilus-actions" ]; then
+ echo "current directory is $(pwd): change to nautilus-actions" 1>&2
exit 1
fi
@@ -19,25 +22,40 @@ if [ ! -f "${tarname}" ]; then
exit 1
fi
-bstable=0
-if [ "x$1" = "xstable" ]; then
- bstable=1
-fi
+minor=$(echo ${version} | cut -d. -f2)
+let minor_x=${minor}/2*2
+[ ${minor} -eq ${minor_x} ] && bstable=1 || bstable=0
echo -n "
Releasing "
[ ${bstable} -eq 1 ] && echo -n "stable" || echo -n "unstable"
echo " ${tarname}"
+echo -n "Are you OK to release (y/N) ? "
+while [ 1 ]; do
+ read -n1 -s key
+ key=$(echo $key | tr '[:upper:]' '[:lower:]')
+ [ "$key" = "y" -o "$key" = "n" -o "$key" = "" ] && break
+done
+[ "$key" = "y" ] && echo "Yes" || echo "No"
+[ "$key" != "y" ] && exit
+
+# are we local ?
destdir="/net/data/tarballs/${product}"
+desthost="stormy.trychlos.org"
+local=1
+[ "$(ls ${destdir} 2>/dev/null)" = "" ] && local=0
echo "
Installing in ${destdir}"
-mkdir -p "${destdir}"
-scp -v "${tarname}" "${destdir}/"
-sha1sum ${tarname} > ${tarname}.sha1sum
+cmd="mkdir -p "${destdir}""
+[ ${local} -eq 0 ] && ssh ${desthost} "${cmd}" || ${cmd}
+[ ${local} -eq 0 ] && scp -v "${tarname}" "${desthost}:${destdir}/" || scp -v "${tarname}" "${destdir}/"
+cmd="sha1sum ${destdir}/${tarname} > ${destdir}/${tarname}.sha1sum"
+[ ${local} -eq 0 ] && ssh ${desthost} "${cmd}" || ${cmd}
if [ "${bstable}" -eq 1 ]; then
echo "Updating ${destdir}/latest.tar.gz"
- (cd ${destdir}; rm -f latest.tar.gz; ln -s ${tarname} latest.tar.gz)
+ cmd="(cd ${destdir}; rm -f latest.tar.gz; ln -s ${tarname} latest.tar.gz)"
+ [ ${local} -eq 0 ] && ssh ${desthost} "${cmd}" || ${cmd}
fi
echo "
@@ -48,12 +66,12 @@ ssh pwieser master gnome org install-module -u ${tarname}
echo "
Installing on kimsufi"
destdir="/home/www/${product}/tarballs"
-scp "${tarname}" root kimsufi:${destdir}/
+scp "${tarname}" maintainer kimsufi:${destdir}/
+ssh maintainer kimsufi "sha1sum ${destdir}/${tarname} > ${destdir}/${tarname}.sha1sum"
if [ "x$1" = "xstable" ]; then
echo "Updating ${destdir}/latest.tar.gz"
- ssh root kimsufi "cd ${destdir}; rm -f latest.tar.gz; ln -s ${tarname} latest.tar.gz"
+ ssh maintainer kimsufi "cd ${destdir}; rm -f latest.tar.gz; ln -s ${tarname} latest.tar.gz"
fi
-ssh root kimsufi chown maintainer:users /home/www/nautilus-actions/tarballs/*
echo "
Tagging git"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]