[DRE-commits] [scripts] 01/01: Import scripts we use on alioth.d.o

zeha at debian.org zeha at debian.org
Wed Jun 29 20:14:49 UTC 2016


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

zeha pushed a commit to branch master
in repository scripts.

commit b9f2c1cc385b3f28f0030718e59b52cf4e4cac77
Author: Christian Hofstaedtler <christian at hofstaedtler.name>
Date:   Wed Jun 29 22:14:40 2016 +0200

    Import scripts we use on alioth.d.o
---
 manifest                     | 28 +++++++++++++++++++++++++
 pkg-ruby-extras-post-receive | 20 ++++++++++++++++++
 post-receive                 |  2 ++
 setup-repository             | 47 +++++++++++++++++++++++++++++++++++++++++
 update-repository            | 50 ++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 147 insertions(+)

diff --git a/manifest b/manifest
new file mode 100755
index 0000000..cd787fa
--- /dev/null
+++ b/manifest
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+set -e
+
+gitdirprefix="$1"
+if test -d gem2deb; then
+  # local
+  gitdirprefix="*/.git"
+  headsprefix=refs/remotes/origin
+else
+  # remote, on alioth
+  gitdirprefix="*.git"
+  headsprefix=refs/heads
+fi
+
+for dir in $gitdirprefix; do
+  name="$dir"
+  name="${name%%.git}"
+  name="${name%%/}"
+  echo "$name:"
+  for head in $dir/$headsprefix/*; do
+    if test -f $head; then
+      headname="${head##*/}"
+      echo -n "  $headname: "
+      cat $head
+    fi
+  done
+done
diff --git a/pkg-ruby-extras-post-receive b/pkg-ruby-extras-post-receive
new file mode 100755
index 0000000..e8cf2f0
--- /dev/null
+++ b/pkg-ruby-extras-post-receive
@@ -0,0 +1,20 @@
+#!/bin/sh
+
+BASE=/home/groups/pkg-ruby-extras
+CONF=$BASE/kgb-client.conf
+DIR=`basename $(readlink -f $GIT_DIR)`
+PKG=${DIR%.git}
+KGB=/home/groups/kgb/trunk
+
+cat > hooks/reflog
+
+# send commit notification on IRC with KGB bots
+# (use newer client)
+cat hooks/reflog | PERL5LIB=$KGB/lib $KGB/script/kgb-client --conf $CONF --repository git --git-reflog - --module $PKG
+
+# update data for the package entropy tracker
+/home/groups/pet/PET2/pkg-ruby-extras/pet-git-helper update $DIR
+
+# send announce to the mailing list
+cat hooks/reflog | grep -v refs/heads/upstream | /usr/local/bin/git-commit-notice
+
diff --git a/post-receive b/post-receive
new file mode 100755
index 0000000..5a1d68f
--- /dev/null
+++ b/post-receive
@@ -0,0 +1,2 @@
+#!/bin/sh
+/home/groups/pkg-ruby-extras/scripts/pkg-ruby-extras-post-receive
diff --git a/setup-repository b/setup-repository
new file mode 100755
index 0000000..fcaff6b
--- /dev/null
+++ b/setup-repository
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+# This script is used to setup a git repository for use by the Debian Ruby
+# Team.
+
+set -e
+
+USAGE="\n\
+This script is used to perform the operations needed to create a git\n\
+repository for use by the Debian Ruby Team.\n\
+\n\
+Usage: setup-repository <package>\n\
+\n\
+Options:
+    <package> is the package name a git repository is being created for.\n"
+
+if [ "$#" -ne "1" ]; then
+	echo -e "${USAGE}"
+	exit 1
+fi
+
+PACKAGE="$1"
+DESCRIPTION="$1.git"
+
+# Create the repository
+mkdir $PACKAGE.git
+cd $PACKAGE.git
+/usr/bin/git --bare init --shared
+
+# Add the repository description
+echo "$DESCRIPTION" >description
+
+# Enable the hook scripts
+mv hooks/post-update.sample hooks/post-update
+#chmod a+x hooks/post-update
+git config --add hooks.mailinglist "pkg-ruby-extras-commits at lists.alioth.debian.org"
+# CIA is dead
+# git config --add hooks.cia-project pkg-ruby-extras
+git config --add hooks.bcc "dispatch+${PACKAGE}_vcs at tracker.debian.org"
+cat >hooks/post-receive <<END
+#!/bin/sh
+/home/groups/pkg-ruby-extras/scripts/pkg-ruby-extras-post-receive
+END
+chmod a+x hooks/post-receive
+
+# Go back to the parent directory
+cd ..
diff --git a/update-repository b/update-repository
new file mode 100755
index 0000000..7d6a02e
--- /dev/null
+++ b/update-repository
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# This script is used to update a git repository for use by the Debian Ruby
+# Extras Team.
+
+set -e
+
+USAGE="\n\
+This script is used to perform the operations needed to create a git\n\
+repository for use by the Debian Ruby Extras Team.\n\
+\n\
+Usage: update-repository <package> '<description>'\n\
+\n\
+Options:
+    <package> is the package name a git repository is being updated for.\n\
+    <description> is a description for the git repository.\n\
+        It should be something like 'Packaging for <package>'.\n"
+
+if [ "$#" -ne "2" ]; then
+	echo -e "${USAGE}"
+	exit 1
+fi
+
+PACKAGE="$1"
+DESCRIPTION="$1.git"
+
+# Create the repository
+# mkdir $PACKAGE.git
+cd $PACKAGE.git
+# /usr/bin/git --bare init --shared
+
+# Add the repository description
+echo "$DESCRIPTION" >description
+
+# Enable the hook scripts
+[ ! -x hooks/post-update ] && \
+  mv hooks/post-update.sample hooks/post-update
+#chmod a+x hooks/post-update
+git config --add hooks.mailinglist "pkg-ruby-extras-commits at lists.alioth.debian.org"
+git config --add hooks.cia-project pkg-ruby-extras
+git config --add hooks.bcc "${PACKAGE}_cvs at packages.qa.debian.org"
+cat >hooks/post-receive <<END
+#!/bin/sh
+exec /usr/local/bin/git-commit-notice
+/home/groups/pet/PET2/pkg-ruby-extras/pet-git-helper update ${PACKAGE}.git
+END
+chmod a+x hooks/post-receive
+
+# Go back to the parent directory
+cd ..

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/scripts.git



More information about the Pkg-ruby-extras-commits mailing list