[Pkg-ocaml-maint-commits] [SCM] dh-ocaml packaging branch, master, updated. debian/0.9.1-1-g11a35b1
Stephane Glondu
steph at glondu.net
Sun Oct 25 12:46:05 UTC 2009
The following commit has been merged in the master branch:
commit 11a35b1a92d6940b91a601fc2d40f604901d2d87
Author: Stephane Glondu <steph at glondu.net>
Date: Sun Oct 25 13:45:58 2009 +0100
dom-new-git-repo: "--notifications" option
diff --git a/debian/changelog b/debian/changelog
index ec96289..e320511 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+dh-ocaml (0.9.2) UNRELEASED; urgency=low
+
+ * dom-new-git-repo: fail by default when executed out of a Git
+ repository and without tarball argument; don't fail if explicitly
+ given "--notifications"
+
+ -- Stéphane Glondu <glondu at debian.org> Sun, 25 Oct 2009 13:43:44 +0100
+
dh-ocaml (0.9.1) unstable; urgency=low
[ Stéphane Glondu ]
diff --git a/manpages/dom-new-git-repo.xml b/manpages/dom-new-git-repo.xml
index 1b82d3e..20fa16a 100644
--- a/manpages/dom-new-git-repo.xml
+++ b/manpages/dom-new-git-repo.xml
@@ -54,6 +54,13 @@
mailing list) are setup and the needed changes are pushed to
alioth.</para>
+ <para>
+ If the option <term><option>--notifications</option></term> is
+ passed instead of a tarball name, and the command is executed
+ outside of a Git repository, then the only effect is to create
+ a new empty Git repository (if it doesn't exist) and to set up
+ notifications.
+ </para>
</refsect1>
<refsect1>
diff --git a/tools/dom-new-git-repo b/tools/dom-new-git-repo
index 590cf67..f9e57eb 100755
--- a/tools/dom-new-git-repo
+++ b/tools/dom-new-git-repo
@@ -7,10 +7,10 @@ CIA_PROJECT="debian-ocaml-maint"
PACKAGE="$1"
TARBALL="$2"
if [ -z "$PACKAGE" ] ; then
- echo "Usage: dom-new-git-repo PKGNAME [ UPSTREAM_TARBALL ]"
+ echo "Usage: dom-new-git-repo PKGNAME [ UPSTREAM_TARBALL | --notifications ]"
exit 1
fi
-if [ -z "$TARBALL" ] ; then
+if [ -f "$TARBALL" ]; then
INJECT_TARBALL="no"
else
INJECT_TARBALL="yes"
@@ -82,9 +82,12 @@ elif git show-ref --quiet 2>/dev/null ; then
echo "I: we are in a git repos"
git_push
setup_notifications
-else
+elif [ "$1" = "--notifications" ]; then
+ echo "I: nothing to be pushed, but we set up notifications as requested"
setup_notifications
- echo "W: nothing pushed!"
+else
+ echo "E: nothing to do"
+ exit 1
fi
--
dh-ocaml packaging
More information about the Pkg-ocaml-maint-commits
mailing list