config: Add upload-release.sh script.
authorMark Wielaard <mark@klomp.org>
Wed, 4 Jul 2018 21:08:41 +0000 (23:08 +0200)
committerMark Wielaard <mark@klomp.org>
Wed, 4 Jul 2018 21:08:41 +0000 (23:08 +0200)
Should be run after making a release to upload the new tar.bz2,
signature file and update the latest symlinks. Make sure to run
make distcheck first. Requires a shell account on sourceware.

Signed-off-by: Mark Wielaard <mark@klomp.org>
config/ChangeLog
config/upload-release.sh [new file with mode: 0755]

index 0e9cc28..f281eb2 100644 (file)
@@ -1,3 +1,7 @@
+2018-07-04  Mark Wielaard  <mark@klomp.org>
+
+       * upload-release.sh: New file.
+
 2018-06-11  Mark Wielaard  <mark@klomp.org>
 
        * elfutils.spec.in: Update for 0.172.
diff --git a/config/upload-release.sh b/config/upload-release.sh
new file mode 100755 (executable)
index 0000000..320d1ad
--- /dev/null
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+# Any error is fatal
+set -e
+
+# We take one arguent, the version (e.g. 0.173)
+if [ $# -ne 1 ]; then
+  echo "$0 <version> (e.g. 0.169)"
+  exit 1
+fi
+
+VERSION="$1"
+
+# Check we are in the build dir already configured.
+ELFUTILS_VERSION=$(echo $VERSION | cut -f2 -d\.)
+grep $ELFUTILS_VERSION version.h \
+       || (echo "Must be run in configured build dir for $VERSION"; exit -1)
+
+make dist
+
+mkdir $VERSION
+cp elfutils-$VERSION.tar.bz2 $VERSION/
+cd $VERSION/
+gpg -b elfutils-$VERSION.tar.bz2
+cd ..
+scp -r $VERSION sourceware.org:/sourceware/ftp/pub/elfutils/
+
+ssh sourceware.org "(cd /sourceware/ftp/pub/elfutils \
+  && ln -sf $VERSION/elfutils-$VERSION.tar.bz2 elfutils-latest.tar.bz2 \
+  && ln -sf $VERSION/elfutils-$VERSION.tar.bz2.sig elfutils-latest.tar.bz2.sig \
+  && ls -lah elfutils-latest*)"