[pkg-haskell-tools] 03/04: New script: upload
Joachim Breitner
nomeata at moszumanska.debian.org
Thu Aug 13 12:12:57 UTC 2015
This is an automated email from the git hooks/post-receive script.
nomeata pushed a commit to branch master
in repository pkg-haskell-tools.
commit 1d72f721e58c42925235eb8a0e6116acd4e905bb
Author: Joachim Breitner <mail at joachim-breitner.de>
Date: Thu Aug 13 14:11:43 2015 +0200
New script: upload
---
debian/changelog | 6 ++++++
scripts/upload | 58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index e940146..777e18c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+pkg-haskell-tools (0.3) UNRELEASED; urgency=medium
+
+ * New script: upload
+
+ -- Joachim Breitner <nomeata at debian.org> Thu, 13 Aug 2015 14:11:34 +0200
+
pkg-haskell-tools (0.2) unstable; urgency=medium
* Use pandoc instead of help2man
diff --git a/scripts/upload b/scripts/upload
new file mode 100755
index 0000000..184ab9e
--- /dev/null
+++ b/scripts/upload
@@ -0,0 +1,58 @@
+#!/bin/bash
+
+set -e
+
+if [ -z "$1" -o "$1" = "--help" ]
+then
+ echo "upload - Uploads, tags and pushes"
+ echo
+ echo "Usage: dht upload 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 0
+fi
+
+
+if [ "$1" = "--manpage" ]
+then
+cat <<'__END__'
+Usage: dht upload foo.changes
+
+Signs the `.changes` file and the corresponding `.dsc` file in a temporary
+location (to avoid touching the original files), uploads them to the archive
+using `dput ssh-upload` and tags them in the repository and pushes the tag.
+
+Checks that the distribution is not `UNRELEASED` and that the tag does
+not exist already (by tagging first).
+__END__
+ exit 0;
+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/pkg-haskell-tools.git
More information about the Pkg-haskell-commits
mailing list