[SCM] Samba Website Repository - branch master updated

Stefan Metzmacher metze at samba.org
Wed Aug 5 12:27:27 UTC 2015


The branch, master has been updated
       via  fae49ea NEWS[sambaXP-2015-recordings]: sambaXP: Listen to the 2015 recordings - and save the date for 2016
       via  24b3b73 prepare_news.sh: add helper script to create new posted news entries
       via  79bc06e remove generated generated_news/latest_{2,10}_{headlines,bodies}.html
      from  1f4365e commit the result of ./generated_news.sh

https://git.samba.org/?p=samba-web.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit fae49eaedcc23c64bb95a353b2c357869620132b
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Aug 5 14:17:51 2015 +0200

    NEWS[sambaXP-2015-recordings]: sambaXP: Listen to the 2015 recordings - and save the date for 2016
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 24b3b7368325279d8f93a2bdafd8ee7447759339
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Aug 5 13:15:38 2015 +0200

    prepare_news.sh: add helper script to create new posted news entries
    
    This can be used like this:
    
    ./prepare_news.sh <NAME> <HEADLINE>
    
    It opens ${EDITOR} in order to fill the body content.
    
    This will be the first example:
    
    ./prepare_news.sh sambaXP-2015-recordings sambaXP: Listen to the 2015 recordings - and save the date for 2016
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

commit 79bc06e51141c4580dfd9473616f9cfa6bcd3830
Author: Stefan Metzmacher <metze at samba.org>
Date:   Wed Aug 5 14:25:52 2015 +0200

    remove generated generated_news/latest_{2,10}_{headlines,bodies}.html
    
    ./generated_news.sh renerates them on the web server every 5 mins.
    
    Signed-off-by: Stefan Metzmacher <metze at samba.org>

-----------------------------------------------------------------------

Summary of changes:
 .gitignore                                         |   3 +
 generated_news/latest_10_bodies.html               |  10 --
 generated_news/latest_10_headlines.html            |  10 --
 generated_news/latest_2_bodies.html                |   2 -
 ...150805-121714.sambaXP-2015-recordings.body.html |  14 +++
 ...05-121714.sambaXP-2015-recordings.headline.html |   3 +
 prepare_news.sh                                    | 135 +++++++++++++++++++++
 7 files changed, 155 insertions(+), 22 deletions(-)
 delete mode 100644 generated_news/latest_10_bodies.html
 delete mode 100644 generated_news/latest_10_headlines.html
 delete mode 100644 generated_news/latest_2_bodies.html
 create mode 100644 posted_news/20150805-121714.sambaXP-2015-recordings.body.html
 create mode 100644 posted_news/20150805-121714.sambaXP-2015-recordings.headline.html
 create mode 100755 prepare_news.sh


Changeset truncated at 500 lines:

diff --git a/.gitignore b/.gitignore
index 4e69724..139d1bf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
 .svn
 *~
+generated_news/latest_10_headlines.html
+generated_news/latest_10_bodies.html
+generated_news/latest_2_bodies.html
diff --git a/generated_news/latest_10_bodies.html b/generated_news/latest_10_bodies.html
deleted file mode 100644
index 547e00c..0000000
--- a/generated_news/latest_10_bodies.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!--#include virtual="/samba/posted_news/20150804-000000.4.3.0rc2.body.html" -->
-<!--#include virtual="/samba/posted_news/20150721-000000.4.3.0rc1.body.html" -->
-<!--#include virtual="/samba/posted_news/20150714-000000.4.2.3.body.html" -->
-<!--#include virtual="/samba/posted_news/20150623-000000.4.1.19.body.html" -->
-<!--#include virtual="/samba/posted_news/20150527-000000.4.2.2.body.html" -->
-<!--#include virtual="/samba/posted_news/20150512-000000.4.1.18.body.html" -->
-<!--#include virtual="/samba/posted_news/20150506-000000.4.0.26.body.html" -->
-<!--#include virtual="/samba/posted_news/20150415-000000.4.2.1.body.html" -->
-<!--#include virtual="/samba/posted_news/20150306-000000.2015-03-06_vmware_lawsuit.body.html" -->
-<!--#include virtual="/samba/posted_news/20150304-000000.4.2.0.body.html" -->
diff --git a/generated_news/latest_10_headlines.html b/generated_news/latest_10_headlines.html
deleted file mode 100644
index 30af6f8..0000000
--- a/generated_news/latest_10_headlines.html
+++ /dev/null
@@ -1,10 +0,0 @@
-<!--#include virtual="/samba/posted_news/20150804-000000.4.3.0rc2.headline.html" -->
-<!--#include virtual="/samba/posted_news/20150721-000000.4.3.0rc1.headline.html" -->
-<!--#include virtual="/samba/posted_news/20150714-000000.4.2.3.headline.html" -->
-<!--#include virtual="/samba/posted_news/20150623-000000.4.1.19.headline.html" -->
-<!--#include virtual="/samba/posted_news/20150527-000000.4.2.2.headline.html" -->
-<!--#include virtual="/samba/posted_news/20150512-000000.4.1.18.headline.html" -->
-<!--#include virtual="/samba/posted_news/20150506-000000.4.0.26.headline.html" -->
-<!--#include virtual="/samba/posted_news/20150415-000000.4.2.1.headline.html" -->
-<!--#include virtual="/samba/posted_news/20150306-000000.2015-03-06_vmware_lawsuit.headline.html" -->
-<!--#include virtual="/samba/posted_news/20150304-000000.4.2.0.headline.html" -->
diff --git a/generated_news/latest_2_bodies.html b/generated_news/latest_2_bodies.html
deleted file mode 100644
index 72d509e..0000000
--- a/generated_news/latest_2_bodies.html
+++ /dev/null
@@ -1,2 +0,0 @@
-<!--#include virtual="/samba/posted_news/20150804-000000.4.3.0rc2.body.html" -->
-<!--#include virtual="/samba/posted_news/20150721-000000.4.3.0rc1.body.html" -->
diff --git a/posted_news/20150805-121714.sambaXP-2015-recordings.body.html b/posted_news/20150805-121714.sambaXP-2015-recordings.body.html
new file mode 100644
index 0000000..3095606
--- /dev/null
+++ b/posted_news/20150805-121714.sambaXP-2015-recordings.body.html
@@ -0,0 +1,14 @@
+<!-- BEGIN: posted_news/20150805-121714.sambaXP-2015-recordings.body.html -->
+<h5><a name="sambaXP-2015-recordings">05 August 2015</a></h5>
+<p class=headline>sambaXP: Listen to the 2015 recordings - and save the date for 2016/p>
+<p>
+Recordings and slides of the sambaXP 2015 talks are now available at
+<a href="www.sambaxp.org">www.sambaxp.org</a>.
+</p>
+<p>
+May 10th-12th 2016 is marked in calendar for the 15th samba XP.
+The Call for Papers is open until February 28th 2016.
+Details and paper registration:
+<a href="www.sambaxp.org/#papers">www.sambaxp.org/#papers</a>.
+</p>
+<!-- END: posted_news/20150805-121714.sambaXP-2015-recordings.body.html -->
diff --git a/posted_news/20150805-121714.sambaXP-2015-recordings.headline.html b/posted_news/20150805-121714.sambaXP-2015-recordings.headline.html
new file mode 100644
index 0000000..eb5295d
--- /dev/null
+++ b/posted_news/20150805-121714.sambaXP-2015-recordings.headline.html
@@ -0,0 +1,3 @@
+<!-- BEGIN: posted_news/20150805-121714.sambaXP-2015-recordings.headline.html -->
+<li> 05 August 2015 <a href="#sambaXP-2015-recordings">sambaXP: Listen to the 2015 recordings - and save the date for 2016</a></li>
+<!-- END: posted_news/20150805-121714.sambaXP-2015-recordings.headline.html -->
diff --git a/prepare_news.sh b/prepare_news.sh
new file mode 100755
index 0000000..a4e37f1
--- /dev/null
+++ b/prepare_news.sh
@@ -0,0 +1,135 @@
+#!/bin/sh
+#
+
+SAVE_LC_ALL="${LC_ALL}"
+SAVE_LANG="${LANG}"
+SAVE_LANGUAGE="${LANGUAGE}"
+
+LC_ALL=C
+export LC_ALL
+LANG=C
+export LANG
+LANGUAGE=C
+export LANGUAGE
+
+set -u
+set -e
+umask 0022
+
+test -d ".git" || {
+	echo "Run this script from the top-level directory in the"
+	echo "repository"
+	exit 1
+}
+
+usage() {
+	echo "usage: $0 <NAME> <HEADLINE>"
+	echo ""
+	echo "This will open \$EDITOR in order to fill in the body content"
+	echo ""
+}
+
+test -n "${EDITOR-}" || {
+	usage
+	exit 1
+}
+
+NAME=${1-}
+test -n "${NAME}" || {
+	usage
+	exit 1
+}
+shift 1
+HEADLINE=$(echo "$@" | xargs)
+test -n "${HEADLINE}" || {
+	usage
+	exit 1
+}
+
+grep -q "<a name=\"${NAME}\"" posted_news/*.body.html && {
+	echo "NAME[${NAME}] is not unique, choose another name"
+	grep "<a name=\"${NAME}\"" posted_news/*.body.html
+	exit 1
+}
+
+nd=$(git diff -p --stat HEAD | wc -l)
+test x"${nd}" = x"0" || {
+	echo "You have uncommited changes your working tree"
+	git status
+	exit 1
+}
+
+trap_handler() {
+	echo ""
+	echo "ERROR: cleaning up"
+	echo ""
+
+	for f in ${CLEANUP_FILES}; do
+		echo "Removing file[${f}]"
+		test -f "${f}" && {
+			rm "${f}" || {
+				echo "failed to remove ${f}"
+			}
+		}
+	done
+
+	test -n "${CLEANUP_RESET_COMMIT}" && {
+		echo "Reverting to commit[${CLEANUP_RESET_COMMIT}]"
+		git reset "${CLEANUP_RESET_COMMIT}"
+	}
+}
+
+CLEANUP_FILES=""
+trap trap_handler INT QUIT TERM EXIT
+
+href="#${NAME}"
+utcdate=$(date --utc +"%d %B %Y")
+utctime=$(date --utc +"%Y%m%d-%H%M%S")
+
+headlinefile="posted_news/${utctime}.${NAME}.headline.html"
+bodyfile="posted_news/${utctime}.${NAME}.body.html"
+echo "generating ${headlinefile}"
+CLEANUP_FILES="${CLEANUP_FILES} ${headlinefile}"
+{
+	echo "<!-- BEGIN: ${headlinefile} -->"
+	echo "<li> ${utcdate} <a href=\"${href}\">${HEADLINE}</a></li>"
+	echo "<!-- END: ${headlinefile} -->"
+} > ${headlinefile}
+
+echo "generating ${bodyfile}"
+CLEANUP_FILES="${CLEANUP_FILES} ${bodyfile}"
+{
+	echo "<!-- BEGIN: ${bodyfile} -->"
+	echo "<h5><a name=\"${NAME}\">${utcdate}</a></h5>"
+	echo "<p class=headline>${HEADLINE}/p>"
+	echo "<p>"
+	echo "<!-- TODO: add your context here -->"
+	echo "</p>"
+	echo "<p>"
+	echo "<!-- TODO: add more context here -->"
+	echo "</p>"
+	echo "<!-- END: ${bodyfile} -->"
+} > ${bodyfile}
+
+LC_ALL="${SAVE_LC_ALL}" \
+LANG="${SAVE_LANG}" \
+LANGUAGE="${SAVE_LANGUAGE}" \
+${EDITOR} ${bodyfile}
+
+CLEANUP_FILES=""
+CLEANUP_RESET_COMMIT="HEAD"
+git add ${headlinefile} ${bodyfile}
+git commit --signoff --message "NEWS[${NAME}]: ${HEADLINE}"
+CLEANUP_RESET_COMMIT="HEAD^"
+
+echo "Once you have pushed the commit a cronjob updates"
+echo "the webserver content every 5 mins."
+echo ""
+echo "Please verify the commit carefully before pushing:"
+echo ""
+echo "  git show -p --stat HEAD"
+echo "  git push ..."
+echo ""
+
+trap - INT QUIT TERM EXIT
+exit 0


-- 
Samba Website Repository



More information about the samba-cvs mailing list