From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 56684 invoked by alias); 9 Oct 2019 00:07:22 -0000 Mailing-List: contact gcc-cvs-wwwdocs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-cvs-wwwdocs-owner@gcc.gnu.org Received: (qmail 56630 invoked by uid 9119); 9 Oct 2019 00:07:22 -0000 Date: Wed, 09 Oct 2019 00:07:00 -0000 Message-ID: <20191009000722.56625.qmail@sourceware.org> From: jsm28@gcc.gnu.org To: gcc-cvs-wwwdocs@gcc.gnu.org Subject: UNNAMED PROJECT branch master updated. 77b0d72a2772def18a9776549c9aee91b93a81e8 X-Git-Refname: refs/heads/master X-Git-Reftype: branch X-Git-Oldrev: 363192da7599480b59ad3e6a57b0e44096ba0306 X-Git-Newrev: 77b0d72a2772def18a9776549c9aee91b93a81e8 X-SW-Source: 2019/txt/msg00250.txt.bz2 This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "UNNAMED PROJECT". The branch, master has been updated via 77b0d72a2772def18a9776549c9aee91b93a81e8 (commit) from 363192da7599480b59ad3e6a57b0e44096ba0306 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 77b0d72a2772def18a9776549c9aee91b93a81e8 Author: Joseph Myers Date: Wed Oct 9 00:06:37 2019 +0000 Add post-receive hook for wwwdocs in git. diff --git a/bin/post-receive b/bin/post-receive new file mode 100755 index 0000000..1114efc --- /dev/null +++ b/bin/post-receive @@ -0,0 +1,55 @@ +#!/bin/bash + +# The post-receive hook receives, on standard input, a series of lines +# of the form: +# +# SP SP LF +# +# describing ref updates that have just occurred. In the case of this +# repository, only updates to refs/heads/master are expected, and only +# such updates should result in automatic website updates. + +TOP_DIR=/www/gcc + +exec >> "$TOP_DIR/updatelog" 2>&1 + +export QMAILHOST=gcc.gnu.org + +tmp=$(mktemp) +cat > "$tmp" + +# Send commit emails. Appropriate config values should be set in the +# git repository for this. +/sourceware/libre/infra/bin/post-receive-email < "$tmp" + +# Update web page checkouts, if applicable. +while read old_value new_value ref_name; do + if [ "$ref_name" != "refs/heads/master" ]; then + continue + fi + unset GIT_DIR + unset GIT_WORK_TREE + cd "$TOP_DIR/wwwdocs-checkout" + git pull --quiet + # $TOP_DIR/bin, $TOP_DIR/cgi-bin and $TOP_DIR/htdocs-preformatted + # should be symlinks into wwwdocs-checkout. + git diff --name-only "$old_value..$new_value" | while read file; do + case "$file" in + (htdocs/*) + ;; + (*) + continue + ;; + esac + dir="${file%/*}" + if ! [ -d "$TOP_DIR/$dir" ]; then + mkdir "$TOP_DIR/$dir" + chmod 2775 "$TOP_DIR/$dir" + fi + if [ -f "$file" ]; then + /www/gcc/bin/preprocess "${file#htdocs/}" + fi + done +done < "$tmp" + +rm "$tmp" ----------------------------------------------------------------------- Summary of changes: bin/post-receive | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 55 insertions(+), 0 deletions(-) create mode 100755 bin/post-receive hooks/post-receive -- UNNAMED PROJECT