[kernel-team] 01/02: Add d-k-prerelease script to finalise and commit changelog
debian-kernel at lists.debian.org
debian-kernel at lists.debian.org
Tue Oct 6 22:32:46 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 967ce4d775d45b4816ca08a677a52704c8be4c63
Author: Ben Hutchings <ben at decadent.org.uk>
Date: Tue Oct 6 23:28:55 2015 +0100
Add d-k-prerelease script to finalise and commit changelog
Script checks for obvious errors, picks the appropriate distribution,
runs dch, then commits with a standard message.
---
scripts/d-k-prerelease | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 53 insertions(+)
diff --git a/scripts/d-k-prerelease b/scripts/d-k-prerelease
new file mode 100755
index 0000000..9e52863
--- /dev/null
+++ b/scripts/d-k-prerelease
@@ -0,0 +1,53 @@
+#!/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
+
+dist="$(dpkg-parsechangelog -S Distribution)"
+if [ "$dist" != UNRELEASED ]; then
+ echo >&2 "E: Changelog distribution is already set to $dist"
+ exit 1
+fi
+
+package="$(dpkg-parsechangelog -S Source)"
+ver="$(dpkg-parsechangelog -S Version)"
+
+case "$branch" in
+master)
+ case "$ver" in
+ *~exp*)
+ dist=experimental
+ ;;
+ *)
+ dist=unstable
+ ;;
+ esac
+ ;;
+sid)
+ dist=unstable
+ ;;
+squeeze-security)
+ dist=squeeze-lts
+ ;;
+*/*)
+ echo >&2 "E: Can't release from private branch $branch"
+ exit 1
+ ;;
+*)
+ dist=$branch
+ ;;
+esac
+
+dch --release --distribution "$dist" --no-force-save-on-release ''
+git commit -m "Prepare to release $package ($ver)." debian/changelog
+
+echo "Remember to tag after building and verifying the package"
--
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