[DHG_packages] 01/01: New too upload

Joachim Breitner nomeata at moszumanska.debian.org
Tue Aug 11 20:33:35 UTC 2015


This is an automated email from the git hooks/post-receive script.

nomeata pushed a commit to branch master
in repository DHG_packages.

commit 9bba954176234dee62437b6ba2f1dc2cce000e33
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Tue Aug 11 22:33:10 2015 +0200

    New too upload
    
    to upload a changes, tag it and push it.
---
 upload.sh | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/upload.sh b/upload.sh
new file mode 100755
index 0000000..1f22fb5
--- /dev/null
+++ b/upload.sh
@@ -0,0 +1,40 @@
+#!/bin/bash
+
+set -e
+
+if [ -z "$1" -o "$1" = "--help" ]
+then
+  echo "Usage: $0 foo.changes"
+  echo
+  echo "Signs the .changes file and the corresponding .dsc file in a temporary"
+  echo "location (to avoid touching the original files), uploads them to the archive"
+  echo "using \"dput ssh-upload\" and tags them in the repository and pushes the tag."
+  echo
+  echo "Checks that the distribution is not UNRELEASED and that the tag does"
+  echo "not exist already (by tagging first)."
+  echo
+  exit 1
+fi
+
+changes="$@"
+
+root="$(realpath --relative-to=$PWD "$(git rev-parse --show-toplevel)")"
+tmpdir=$root/uploads
+
+if [ -e $tmpdir ]
+then
+	echo "$tmpdir exists, please remove"
+	exit 1
+fi
+trap 'rm -rf "$tmpdir"' EXIT
+mkdir $tmpdir
+
+for c in $changes
+do
+	src="$(grep ^Source "$c"|grep-dctrl -s Source -n '' )"
+	$root/tag.pl $root/p/$src
+	dcmd cp -v "$c" "$tmpdir"
+	debsign "$tmpdir"/"$(basename "$c")"
+	dput ssh-upload "$tmpdir"/"$(basename "$c")"
+done
+git push --tags

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/DHG_packages.git



More information about the Pkg-haskell-commits mailing list