From f82aa51adf4ea5317ef37669319bc9651692e738 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 26 Oct 2014 00:14:19 +0200 Subject: refactor code into new publish_changes_to_userContent() This new function is used to publish both the Debian Edu manuals as well as the Debian Installer installation-guide to https://jenkins.debian.net/userContent/debian-edu-doc/ and https://jenkins.debian.net/userContent/installation-guide/ --- bin/chroot-run.sh | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) (limited to 'bin/chroot-run.sh') diff --git a/bin/chroot-run.sh b/bin/chroot-run.sh index 19beabea..62d35dfe 100755 --- a/bin/chroot-run.sh +++ b/bin/chroot-run.sh @@ -80,27 +80,11 @@ cleanup() { fi # - # special case debian-edu-doc + # special case: publish debian-edu-doc on the webserver # CHANGES=$(ls -1 $CHROOT_TARGET/tmp/debian-edu-doc_*.changes 2>/dev/null|| true) if [ ! -z "$CHANGES" ] ; then - echo "Extracting contents from .deb files..." - NEWDOC=$(mktemp -d) - for DEB in $(dcmd --deb $CHANGES) ; do - dpkg --extract $DEB $NEWDOC 2>/dev/null - done - EDUDOC="/var/lib/jenkins/userContent/debian-edu-doc" - rm -rf $EDUDOC - mkdir $EDUDOC - mv $NEWDOC/usr/share/doc/debian-edu-doc-* $EDUDOC/ - VERSION=$(echo $CHANGES | cut -d "_" -f2) - touch "$EDUDOC/${VERSION}_git${GIT_COMMIT:0:7}" - rm -r $NEWDOC - MESSAGE="https://jenkins.debian.net/userContent/debian-edu-doc/ has been updated from ${GIT_COMMIT:0:7}" - kgb-client --conf /srv/jenkins/kgb/debian-edu.conf --relay-msg "$MESSAGE" - echo - echo $MESSAGE - echo + publish_changes_to_userContent $CHANGES debian-edu "git${GIT_COMMIT:0:7}" fi if [ -d $CHROOT_TARGET/proc ]; then -- cgit v1.2.3-54-g00ecf