tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dkupp...@apache.org
Subject tinkerpop git commit: completed homepage publish script
Date Thu, 20 Oct 2016 20:41:26 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1485 b0f3f398d -> 72002fd3e


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/72002fd3
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/72002fd3
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/72002fd3

Branch: refs/heads/TINKERPOP-1485
Commit: 72002fd3eea6ca5237c519d0b4a87efd190fe212
Parents: b0f3f39
Author: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Authored: Thu Oct 20 22:40:52 2016 +0200
Committer: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Committed: Thu Oct 20 22:40:52 2016 +0200

----------------------------------------------------------------------
 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/72002fd3/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/72002fd3/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/72002fd3/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">


Mime
View raw message