You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2016/10/27 11:59:15 UTC

[31/50] [abbrv] tinkerpop git commit: completed homepage publish script

completed homepage publish script


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/f38469c1
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/f38469c1
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/f38469c1

Branch: refs/heads/TINKERPOP-1485
Commit: f38469c12207a13fe91f9ec46c92996a73af14e3
Parents: f1a5623
Author: Daniel Kuppitz <da...@hotmail.com>
Authored: Thu Oct 20 22:40:52 2016 +0200
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Thu Oct 27 07:39:51 2016 -0400

----------------------------------------------------------------------
 site/bin/generate-home.sh             | 21 ++++++++++++-----
 site/bin/publish-home.sh              | 38 +++++++++++++++++++++++++++---
 site/home/template/header-footer.html |  8 +++----
 3 files changed, 54 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f38469c1/site/bin/generate-home.sh
----------------------------------------------------------------------
diff --git a/site/bin/generate-home.sh b/site/bin/generate-home.sh
index dc41a7c..6e97923 100755
--- a/site/bin/generate-home.sh
+++ b/site/bin/generate-home.sh
@@ -18,14 +18,23 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-if [[ -d ../target/site/home ]]; then
-  rm -r ../target/site/home
-fi
+cd `dirname $0`/..
+
+rm -rf ../target/site/home
 mkdir -p ../target/site/
-cp -R home ../target/site
+
+hash rsync 2> /dev/null
+
+if [ $? -eq 0 ]; then
+  rsync -avq home ../target/site --exclude template
+else
+  cp -R home ../target/site
+  rm -rf ../target/site/home/template
+fi
 
 for filename in home/*.html; do
-    sed -e "/!!!!!BODY!!!!!/ r $filename" home/template/header-footer.html -e /!!!!!BODY!!!!!/d > "../target/site/$filename"
+echo $filename
+    sed -e "/!!!!!BODY!!!!!/ r $filename" home/template/header-footer.html -e /!!!!!BODY!!!!!/d > "../target/site/${filename}"
 done
 
-echo "Home page site generated to target/site/home"
\ No newline at end of file
+echo "Home page site generated to $(cd ../target/site/home ; pwd)"

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f38469c1/site/bin/publish-home.sh
----------------------------------------------------------------------
diff --git a/site/bin/publish-home.sh b/site/bin/publish-home.sh
old mode 100644
new mode 100755
index 7be58c8..3e6cc7d
--- a/site/bin/publish-home.sh
+++ b/site/bin/publish-home.sh
@@ -19,6 +19,8 @@
 # under the License.
 #
 
+cd `dirname $0`/..
+
 USERNAME=$1
 
 if [ "${USERNAME}" == "" ]; then
@@ -27,13 +29,43 @@ if [ "${USERNAME}" == "" ]; then
   exit 1
 fi
 
+if [ ! -d ../target/site/home ]; then
+  bin/generate-home.sh || exit 1
+  echo
+fi
+
 read -s -p "Password for SVN user ${USERNAME}: " PASSWORD
 echo
 
 SVN_CMD="svn --no-auth-cache --username=${USERNAME} --password=${PASSWORD}"
 
+cd ..
 rm -rf target/svn
-bin/generate-home.sh
-
 mkdir -p target/svn
-${SVN_CMD} co --depth immediates https://svn.apache.org/repos/asf/tinkerpop/site target/svn
\ No newline at end of file
+
+${SVN_CMD} co --depth files https://svn.apache.org/repos/asf/tinkerpop/site target/svn
+
+cd target/svn
+
+find ../site/home -mindepth 1 -maxdepth 1 -type d | xargs -n1 basename | xargs -r ${SVN_CMD} update
+
+diff -rq ./ ../site/home/ | awk -f ../../bin/publish-docs.awk | sed 's/^\(.\) \//\1 /g' > ../publish-home.files
+
+for file in $(cat ../publish-home.files | awk '/^[AU]/ {print $2}')
+do
+  if [ -d "../site/home/${file}" ]; then
+    mkdir -p "${file}" && cp -r "../site/home/${file}"/* "$_"
+  else
+    mkdir -p "`dirname ${file}`" && cp "../site/home/${file}" "$_"
+  fi
+done
+
+cat ../publish-home.files | awk '/^A/ {print $2}' | xargs -r svn add --parents
+cat ../publish-home.files | awk '/^D/ {print $2}' | xargs -r svn delete
+
+CHANGES=$(cat ../publish-home.files | wc -l)
+
+if [ ${CHANGES} -gt 0 ]; then
+  ${SVN_CMD} commit -m "Deploy TinkerPop homepage"
+fi
+

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/f38469c1/site/home/template/header-footer.html
----------------------------------------------------------------------
diff --git a/site/home/template/header-footer.html b/site/home/template/header-footer.html
index ab6db20..390279e 100644
--- a/site/home/template/header-footer.html
+++ b/site/home/template/header-footer.html
@@ -16,10 +16,10 @@ limitations under the License.
 -->
 <!DOCTYPE html>
 <!--
-   \,,,/
-   (o o)
-   -oOOo-(3)-oOOo-
-   -->
+       \,,,/
+       (o o)
+  -oOOo-(3)-oOOo-
+-->
 <html lang="en">
    <head>
       <meta charset="utf-8">