You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by wa...@apache.org on 2020/10/29 01:19:35 UTC
[openoffice-org] branch main updated: Getting ready for site and
staging builds
This is an automated email from the ASF dual-hosted git repository.
wave pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/openoffice-org.git
The following commit(s) were added to refs/heads/main by this push:
new e6c9c87 Getting ready for site and staging builds
e6c9c87 is described below
commit e6c9c874b4cc99074091ec4954eb0108989d6fbd
Author: Dave Fisher <da...@davefisher.tech>
AuthorDate: Wed Oct 28 18:18:44 2020 -0700
Getting ready for site and staging builds
---
.gitignore | 3 ++-
build_staging.sh | 23 +++++++++++++++++++++++
templates/ssi.json | 3 ---
tools/copyasset.sh | 45 +++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 70 insertions(+), 4 deletions(-)
diff --git a/.gitignore b/.gitignore
index 53f2582..df9a613 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,5 @@ output
cache
.DS_Store
.history
-.idea
\ No newline at end of file
+.idea
+*~
\ No newline at end of file
diff --git a/build_staging.sh b/build_staging.sh
new file mode 100755
index 0000000..ae122ce
--- /dev/null
+++ b/build_staging.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+CURRENTDIR=`pwd`
+WORKDIR=/tmp/ooo-site
+ME=`basename $0`
+
+rm -rf $WORKDIR
+mkdir -p $WORKDIR
+
+# now bake the site
+./bake.sh -b . $WORKDIR
+
+# push all of the results to asf-site
+git checkout asf-staging
+git clean -f -d
+git pull origin asf-staging
+rm -rf content
+mkdir content
+cp -a $WORKDIR/* content
+cp -a $WORKDIR/.htaccess content
+git add content
+git commit -m "git-site-role commit from $ME"
+git push origin asf-staging
diff --git a/templates/ssi.json b/templates/ssi.json
index 15957e9..1e56c8b 100644
--- a/templates/ssi.json
+++ b/templates/ssi.json
@@ -1,10 +1,7 @@
{
"/": {
- "doctype":"/doctype.html",
- "footer":"/footer.html",
"brand":"/brand.html",
"topnav":"/topnav.html",
- "home":"home"
}
"/sl/": {
"brand":"/sl/brand.html",
diff --git a/tools/copyasset.sh b/tools/copyasset.sh
new file mode 100755
index 0000000..f3c9ab6
--- /dev/null
+++ b/tools/copyasset.sh
@@ -0,0 +1,45 @@
+#!/bin/sh
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+if test "$#" != 2; then
+ echo "USAGE: $0 PATH SUFFIX"
+ exit 1
+fi
+
+toolsdir=`pwd`
+rootdir=${toolsdir}/../../
+
+webproject=$1
+suffixmatch=$2
+
+if test -d ${contentdir}${webproject}; then
+ echo "============ '$webproject' performing url fixups ..."
+ cd ${contentdir}${webproject}
+ for htmlfile in `find . -name "${suffixmatch}"` ; do
+ echo ${htmlfile}
+ mv ${htmlfile} ${htmlfile}.bak
+ sed -f ${sedscripts} ${htmlfile}.bak > ${htmlfile}
+ diff -q ${htmlfile}.bak ${htmlfile}
+ rm ${htmlfile}.bak
+ done
+ echo "============ '$webproject' performing url fixups ..."
+ find . -name "${suffixmatch}" -exec grep -o "http://.*openoffice.org/" {} \;
+fi
+echo " "