You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@crail.apache.org by at...@apache.org on 2018/01/21 10:21:11 UTC
[53/53] incubator-crail-website git commit: Adding testing and
publishing scripts
Adding testing and publishing scripts
Project: http://git-wip-us.apache.org/repos/asf/incubator-crail-website/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-crail-website/commit/3621f134
Tree: http://git-wip-us.apache.org/repos/asf/incubator-crail-website/tree/3621f134
Diff: http://git-wip-us.apache.org/repos/asf/incubator-crail-website/diff/3621f134
Branch: refs/heads/master
Commit: 3621f1348496fc5d9091141425a81ead7ca598d8
Parents: 857fca1
Author: Animesh Trivedi <an...@gmail.com>
Authored: Sun Jan 21 11:19:47 2018 +0100
Committer: Animesh Trivedi <an...@gmail.com>
Committed: Sun Jan 21 11:19:47 2018 +0100
----------------------------------------------------------------------
publish.sh | 41 +++++++++++++++++++++++++++++++++++++++++
test-locally.sh | 23 +++++++++++++++++++++++
2 files changed, 64 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-crail-website/blob/3621f134/publish.sh
----------------------------------------------------------------------
diff --git a/publish.sh b/publish.sh
new file mode 100755
index 0000000..fe8cc8b
--- /dev/null
+++ b/publish.sh
@@ -0,0 +1,41 @@
+#!/usr/bin/env bash
+#
+# 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.
+#
+# copied from: https://github.com/apache/bahir-website/blob/master/publish.sh
+
+set -e
+cd site
+bundle exec jekyll clean
+bundle exec jekyll build -d _site
+COMMIT_HASH=`git rev-parse HEAD`
+cd ..
+git checkout asf-site
+git branch --set-upstream-to=origin/asf-site asf-site
+git pull --rebase
+rm -rf content
+mkdir content
+mv site/_site/* content
+git add content
+echo "Publishing changes from master branch $COMMIT_HASH"
+git commit -a -m "Publishing from $COMMIT_HASH"
+echo "> > >"
+echo " "
+echo "You are now on the asf-site branch"
+echo "Run git push origin asf-site to update the live site."
+echo " "
+echo " "
+set +e
http://git-wip-us.apache.org/repos/asf/incubator-crail-website/blob/3621f134/test-locally.sh
----------------------------------------------------------------------
diff --git a/test-locally.sh b/test-locally.sh
new file mode 100755
index 0000000..ce6c653
--- /dev/null
+++ b/test-locally.sh
@@ -0,0 +1,23 @@
+#!/usr/bin/env bash
+#
+# 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.
+#
+
+set -e
+cd site
+bundle exec jekyll serve --watch
+cd -
+set +e