summaryrefslogtreecommitdiffstats
path: root/config/upload-release.sh
diff options
context:
space:
mode:
Diffstat (limited to 'config/upload-release.sh')
-rwxr-xr-xconfig/upload-release.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/config/upload-release.sh b/config/upload-release.sh
new file mode 100755
index 00000000..320d1ada
--- /dev/null
+++ b/config/upload-release.sh
@@ -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*)"