[kernel-team] 01/01: Add tagging script

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Thu Aug 13 09:46:15 UTC 2015


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

benh pushed a commit to branch master
in repository kernel-team.

commit 76b2ccbdf0373e103a6bfa6e421f078549fad14d
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Thu Aug 13 11:40:46 2015 +0200

    Add tagging script
---
 scripts/d-k-tag | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/scripts/d-k-tag b/scripts/d-k-tag
new file mode 100755
index 0000000..21dbb25
--- /dev/null
+++ b/scripts/d-k-tag
@@ -0,0 +1,36 @@
+#!/bin/sh -eu
+
+# Check that we are on a branch
+if ! git diff --quiet HEAD; then
+   echo >&2 "E: Working tree has uncommitted changes"
+   exit 1
+fi
+head="$(cat .git/HEAD)"
+branch="${head#ref: refs/heads/}"
+if [ "$branch" = "$head" ]; then
+   echo >&2 "E: HEAD is not a branch ($head)"
+   exit 1
+fi
+
+# Check that distribution agrees with branch
+dist=$(dpkg-parsechangelog -S Distribution)
+case "$branch,$dist" in
+master,sid | master,experimental | squeeze-security,squeeze-lts)
+    # OK
+    ;;
+*)
+    if [ "$branch" != "$dist" ]; then
+	echo >&2 "E: Uploads to $dist do not belong on branch $branch"
+	exit 1
+    fi
+    ;;
+esac
+
+# OK, let's do it
+package="$(dpkg-parsechangelog -S Source)"
+ver="$(dpkg-parsechangelog -S Version)"
+tag="debian/$(echo $ver | sed 's/~/_/g; s/:/%/g')"
+echo "Creating tag $tag"
+git tag -s -m "Release $package ($ver)." $tag
+
+echo "Remember to push $branch and $tag to Alioth"

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/kernel-team.git



More information about the Kernel-svn-changes mailing list