public inbox for gcc-cvs-wwwdocs@sourceware.org
help / color / mirror / Atom feed
* UNNAMED PROJECT branch master updated. 77b0d72a2772def18a9776549c9aee91b93a81e8
@ 2019-10-09  0:07 jsm28
  0 siblings, 0 replies; only message in thread
From: jsm28 @ 2019-10-09  0:07 UTC (permalink / raw)
  To: gcc-cvs-wwwdocs

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 <joseph@codesourcery.com>
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:
+#
+# <old-value> SP <new-value> SP <ref-name> 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-10-09  0:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09  0:07 UNNAMED PROJECT branch master updated. 77b0d72a2772def18a9776549c9aee91b93a81e8 jsm28

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).