summaryrefslogtreecommitdiffstats
path: root/src/boost/tools/quickbook/build/publish-docs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 18:45:59 +0000
commit19fcec84d8d7d21e796c7624e521b60d28ee21ed (patch)
tree42d26aa27d1e3f7c0b8bd3fd14e7d7082f5008dc /src/boost/tools/quickbook/build/publish-docs
parentInitial commit. (diff)
downloadceph-upstream.tar.xz
ceph-upstream.zip
Adding upstream version 16.2.11+ds.upstream/16.2.11+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-xsrc/boost/tools/quickbook/build/publish-docs65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/boost/tools/quickbook/build/publish-docs b/src/boost/tools/quickbook/build/publish-docs
new file mode 100755
index 000000000..ab134474d
--- /dev/null
+++ b/src/boost/tools/quickbook/build/publish-docs
@@ -0,0 +1,65 @@
+#==============================================================================
+# Copyright (c) 2017 Daniel James
+#
+# Use, modification and distribution is subject to the Boost Software
+# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+#==============================================================================
+
+#!/usr/bin/env bash
+set -e
+
+# Change to the quickbook root directory
+cd $(dirname $0)
+cd ..
+
+# Git settings
+remote=git@github.com:boostorg/quickbook.git
+branch=gh-pages
+
+main() {
+ git fetch "$remote" "$branch:$branch"
+ b2 -aq doc//fully-standalone
+ write_fast_import gh-pages | git fast-import --date-format=now --quiet
+ git push "$remote" "$branch"
+}
+
+write_fast_import() {
+ committer="$(git config user.name) <$(git config user.email)>"
+ commit_message="Rebuild documentation"
+ branch=$1
+
+ # Start commit
+ echo "commit refs/heads/${branch}"
+ echo "committer ${committer} now"
+ echo "data ${#commit_message}"
+ echo $commit_message
+ echo "from ${branch}"
+ echo "merge HEAD"
+
+ # Delete everything and rebuild tree from scratch.
+ echo "deleteall"
+
+ # Copy all files from HEAD
+ git ls-tree -r HEAD |
+ while read mode type hash path ; do
+ echo "M $mode $hash $path"
+ done
+
+ # Preserve index.html from the github pages branch
+ git ls-tree $branch -- index.html |
+ while read mode type hash path ; do
+ echo "M $mode $hash $path"
+ done
+
+ # Check in documentation
+ find doc/html -type f | while read path; do
+ size=$(wc -c "$path")
+ echo "M 100644 inline $path"
+ echo "data $size"
+ cat "$path"
+ echo
+ done
+}
+
+main \ No newline at end of file