You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ad...@apache.org on 2016/02/14 03:21:49 UTC

[2/3] incubator-mynewt-site git commit: Script for generating static site

Script for generating static site

This captures the steps that are currently done manually.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/commit/77d84dd1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/tree/77d84dd1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/diff/77d84dd1

Branch: refs/heads/master
Commit: 77d84dd1c99a7786764d10243cd848c8aa4bc7d0
Parents: 1ecfc9e
Author: spoonofpower <sp...@gmail.com>
Authored: Fri Feb 12 15:22:09 2016 -0800
Committer: spoonofpower <sp...@gmail.com>
Committed: Sat Feb 13 13:51:46 2016 -0800

----------------------------------------------------------------------
 build.sh | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-site/blob/77d84dd1/build.sh
----------------------------------------------------------------------
diff --git a/build.sh b/build.sh
new file mode 100755
index 0000000..cc47173
--- /dev/null
+++ b/build.sh
@@ -0,0 +1,34 @@
+#!/bin/bash -e
+
+if [[ "$1" != "build"  ]]; then
+    echo "Build the mynewt website"
+    echo "Make sure git status is clean and run from the master branch"
+    echo
+    echo "Usage: $0 build"
+    exit
+fi
+
+echo mkdocs clean build:
+mkdocs build --clean
+
+echo Remove unwanted html templates
+find site -name "*.html" | xargs grep '{%.*%}' -l | xargs rm
+
+echo Copy extras into site
+cp -a extras/ site/
+
+echo Change git branch to asf-site
+git checkout asf-site
+
+echo Remove old content
+ls | grep -v site | xargs rm -rf
+
+echo Copy contents of site to serving directory
+cp -a site/ .
+
+echo ---
+echo --- You are now on the asf-site branch
+echo --- Review git diffs before commiting
+echo ---
+git status
+