Use gbp's new postclone-hook for fine-tuning local checkouts
authorIOhannes m zmölnig <zmoelnig@umlautQ.umlaeute.mur.at>
Mon, 1 Aug 2016 10:17:35 +0000 (12:17 +0200)
committerIOhannes m zmölnig <zmoelnig@umlautQ.umlaeute.mur.at>
Mon, 1 Aug 2016 10:17:35 +0000 (12:17 +0200)
obsoletes git-tuneclone.sh

debian/README.source
debian/gbp.conf
debian/gbp/postclone.sh [new file with mode: 0755]
debian/git-tuneclone.sh [deleted file]

index 9415e63b3e8742eeb0bb4731fccc97bc6660f453..f4cc27bc5e5b26ed88a295b77b2bb24870f24afd 100644 (file)
@@ -6,20 +6,14 @@ As of version 1.1, the sources have been repacked:
 - removed jacktrip/externals (esp. the pre-build W32 binaries)
 - removed local-copy of RtAudio in jacktrip/src
 
-git-tuneclone.sh
-----------------
+gbp clone
+---------
 
-This package comes with a script 'debian/git-tuneclone.sh'.
-Running it after a fresh clone of the packaging repository
-will fine-tune your local copy, namely:
+Starting with gbp>0.8.1, When cloning this repository via `gbp clone` (rather
+than `git clone`), the local repository will be automatically fine-tuned:
 - make git ignore any .pc/ directory (created by quilt)
 - enable the "-follow-tags" when running 'git-push', so it's harder
   to forget to push packaging tags along with the branches.
-- do an initial checkout of the 3 packaging branches (master, pristine-tar,
-  upstream)
-The script only needs to run once (though running it multiple times shouldn't
-matter).
-You are of course free to *not* run the script, if you prefer.
 
- -- IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org>  Tue, 11 Nov 2015 11:11:03 +0100
+ -- IOhannes m zmölnig (Debian/GNU) <umlaeute@debian.org>  Mon, 1 Aug 2016 12:15:50 +0200
 
index a7281f94b2b532a1b8b07631ce0fc5d598e27ecc..25f35f8658bad908ade0c51db4549add1223e12f 100644 (file)
@@ -3,3 +3,6 @@
 [DEFAULT]
 pristine-tar = True
 sign-tags = True
+
+[clone]
+git-postclone = debian/gbp/postclone.sh
diff --git a/debian/gbp/postclone.sh b/debian/gbp/postclone.sh
new file mode 100755 (executable)
index 0000000..59ac8c6
--- /dev/null
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+## script to initialize a cloned repository
+## with per (local) repository settings.
+
+# - ignore quilt's .pc/ directory
+# - enable the "--follow-tags" mode for pushing
+
+error() {
+ echo "$@" 1>&2
+}
+
+NAME=$(dpkg-parsechangelog -S Source)
+
+if [ "x${NAME}" = "x" ]; then
+ error "unable to determine package name"
+ error "make sure you run this script within a source package dir"
+ exit 1
+fi
+
+if [ ! -d ".git" ]; then
+ error "it seems like this source package is not under git control"
+ exit 1
+fi
+
+echo "tuning git-repository for ${NAME}"
+git config push.followTags true && echo "enabled push.followTags"
+
+GITEXCLUDE=".git/info/exclude"
+egrep "^/?\.pc/?$" "${GITEXCLUDE}" >/dev/null 2>&1 \
+  || (echo "/.pc/" >> "${GITEXCLUDE}" && echo "ignoring /.pc/")
+
+for branch in pristine-tar upstream master; do
+ git checkout "${branch}"
+done
diff --git a/debian/git-tuneclone.sh b/debian/git-tuneclone.sh
deleted file mode 100755 (executable)
index 59ac8c6..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-
-## script to initialize a cloned repository
-## with per (local) repository settings.
-
-# - ignore quilt's .pc/ directory
-# - enable the "--follow-tags" mode for pushing
-
-error() {
- echo "$@" 1>&2
-}
-
-NAME=$(dpkg-parsechangelog -S Source)
-
-if [ "x${NAME}" = "x" ]; then
- error "unable to determine package name"
- error "make sure you run this script within a source package dir"
- exit 1
-fi
-
-if [ ! -d ".git" ]; then
- error "it seems like this source package is not under git control"
- exit 1
-fi
-
-echo "tuning git-repository for ${NAME}"
-git config push.followTags true && echo "enabled push.followTags"
-
-GITEXCLUDE=".git/info/exclude"
-egrep "^/?\.pc/?$" "${GITEXCLUDE}" >/dev/null 2>&1 \
-  || (echo "/.pc/" >> "${GITEXCLUDE}" && echo "ignoring /.pc/")
-
-for branch in pristine-tar upstream master; do
- git checkout "${branch}"
-done