[SCM] Script to run on alioth, to handle hooks and other scripts branch, master, updated. 4c8b4a2fa4f1fc64e4db672a86c9e28c5e79f69f

Sandro Knauß hefee at moszumanska.debian.org
Mon Jan 9 10:59:28 UTC 2017


Gitweb-URL: http://git.debian.org/?p=pkg-kde/alioth-tooling.git;a=commitdiff;h=4c8b4a2

The following commit has been merged in the master branch:
commit 4c8b4a2fa4f1fc64e4db672a86c9e28c5e79f69f
Author: Sandro Knauß <hefee at debian.org>
Date:   Mon Jan 9 11:43:36 2017 +0100

    make creation of hooks more straight forward
---
 hooks/{pkgkde-post-receive-hook => post-receive} |  0
 hooks/{pkgkde-update-hook => update}             |  0
 setup-git-repository                             | 29 ++++++++++++------------
 3 files changed, 14 insertions(+), 15 deletions(-)

diff --git a/hooks/pkgkde-post-receive-hook b/hooks/post-receive
similarity index 100%
rename from hooks/pkgkde-post-receive-hook
rename to hooks/post-receive
diff --git a/hooks/pkgkde-update-hook b/hooks/update
similarity index 100%
rename from hooks/pkgkde-update-hook
rename to hooks/update
diff --git a/setup-git-repository b/setup-git-repository
index ab11ae1..98dbe28 100755
--- a/setup-git-repository
+++ b/setup-git-repository
@@ -1,5 +1,8 @@
 #!/bin/sh
 
+BASE_REPO=/git/pkg-kde
+TOOLING_REPO=$BASE_REPO/alioth-tooling
+
 usage()
 {
 	cat <<-EOF
@@ -12,8 +15,8 @@ usage()
 
 # Make sure we are in the pkg-kde dir
 pwd="`pwd`"
-if [ "$pwd" = "${pwd#*/git/pkg-kde*}" ]; then
-	echo "Error: current working directory is not /git/pkg-kde*" >&2
+if [ "$pwd" = "${pwd#*$BASE_REPO*}" ]; then
+	echo "Error: current working directory is not $BASE_REPO*" >&2
 	usage >&2
 	exit 1
 fi
@@ -52,9 +55,6 @@ umask 002
 mkdir -p $repo
 GIT_DIR=$repo git init --bare --shared
 echo "$description" > $repo/description
-ln -s /git/pkg-kde/git-post-update "$repo/hooks/post-update"
-# since post-update is a symlink, we need no explicit chmod ~apachelogger
-#chmod a+x "$repo/hooks/post-update"
 GIT_DIR=$repo git config --add hooks.cia-project DebianQtKDE
 
 echo "Repo $repo has been created"
@@ -66,15 +66,14 @@ git config hooks.mailinglist "pkg-kde-commits at lists.alioth.debian.org"
 git config hooks.bcc "${package}_cvs at packages.qa.debian.org"
 #git config hooks.cia-project debian-pkg-multimedia
 git config hooks.cia-project DebianQtKDE
-ln -s /git/pkg-kde/pkgkde-post-receive-hook hooks/post-receive
-#cat > hooks/post-receive <<END
-##!/bin/sh
-#exec /git/pkg-kde/git-commit-notice
-#END
-#chmod 755 hooks/post-receive
-
-if [ "$category" != "kde-extras" ]; then
-	ln -s /git/pkg-kde/pkgkde-update-hook hooks/update
-fi
+
+#setup hooks
+for i in $TOOLING_REPO/hooks/; do
+    name=`basename $i`
+    if [ "$name" = "update" ] && [ "$category" = "kde-extras" ]; then
+        continue
+    fi
+    ln -s $i hooks/$name
+done
 
 echo "Commit messages for $repo have been forwarded to pkg-kde-commits at lists.alioth.debian.org and ${package}_cvs at packages.qa.debian.org"

-- 
Script to run on alioth, to handle hooks and other scripts



More information about the pkg-kde-commits mailing list