Simple helper to tag a version if using git-svn
authorGuido Günther <agx@sigxcpu.org>
Tue, 24 Aug 2010 17:24:06 +0000 (19:24 +0200)
committerGuido Günther <agx@sigxcpu.org>
Tue, 24 Aug 2010 17:24:06 +0000 (19:24 +0200)
examples/gbp-svn-tag [new file with mode: 0644]

diff --git a/examples/gbp-svn-tag b/examples/gbp-svn-tag
new file mode 100644 (file)
index 0000000..374b23a
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+#
+# Helper script to tag a version in SVN if using git-svn(1)
+
+DIST=$(dpkg-parsechangelog | awk "/^Distribution:/{ print \$2; }")
+VERSION=$(dpkg-parsechangelog | awk "/^Version:/{ print \$2; }")
+
+
+if [ "$DIST" = "UNRELEASED" ]; then
+    echo "Distribution is unreleased"
+    exit 1
+elif [ -z "$VERSION" ]; then
+    echo "Cant read package version"
+    exit 1
+fi
+
+git svn tag -m"Tagging system-config-printer ($VERSION)" $VERSION
+