aboutsummaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2016-08-18 22:55:33 +0900
committerKazuki Yamaguchi <k@rhe.jp>2016-08-18 22:55:33 +0900
commitd073625c7964ecccc58a7b418deb4d43a404f8dc (patch)
tree1e1130992caea41e02fa2d36e7bd6040f2dde874 /tool
parentd58755d03c9b372633a7bfa5c39c99642330d828 (diff)
parentdf476cdaa935204b318a28ee588ba40ed994b072 (diff)
downloadruby-openssl-d073625c7964ecccc58a7b418deb4d43a404f8dc.tar.gz
Merge branch 'topic/gh-pages-rdoc'
* topic/gh-pages-rdoc: Fix RDoc main page tool/sync-with-trunk: ignore openssl.gemspec in Ruby tree Add tool/update-gh-pages
Diffstat (limited to 'tool')
-rwxr-xr-xtool/sync-with-trunk2
-rwxr-xr-xtool/update-gh-pages22
2 files changed, 23 insertions, 1 deletions
diff --git a/tool/sync-with-trunk b/tool/sync-with-trunk
index c4fcf1f7..21854a7f 100755
--- a/tool/sync-with-trunk
+++ b/tool/sync-with-trunk
@@ -37,7 +37,7 @@ echo "#### Step 1. Sync '$BRANCH_EXTRACT' with 'ruby/trunk'"
git filter-branch -f --prune-empty --index-filter '
git rm --cached -qr --ignore-unmatch . &&
git reset -q $GIT_COMMIT -- ext/openssl test/openssl sample/openssl &&
- git rm --cached -q --ignore-unmatch ext/openssl/depend
+ git rm --cached -q --ignore-unmatch ext/openssl/depend ext/openssl/openssl.gemspec
' -- $filter_range ||:
echo "## Adjust path"
diff --git a/tool/update-gh-pages b/tool/update-gh-pages
new file mode 100755
index 00000000..8eb546a9
--- /dev/null
+++ b/tool/update-gh-pages
@@ -0,0 +1,22 @@
+#!/bin/sh
+set -e
+
+# Generates RDoc HTML and update gh-pages branch.
+
+HEAD_DESCRIPTION=$(git describe --dirty --always --abbrev=12)
+
+[ -d html ] &&
+ rm -r html
+rake rdoc
+
+[ ! -d tmp/gh-pages ] &&
+ git worktree add tmp/gh-pages gh-pages
+(
+ cd tmp/gh-pages
+
+ git rm -r .
+ cp -r ../../html/* .
+ rm created.rid js/*.gz # to avoid unnecessary change :x
+ git add .
+ git commit -m "Sync with $HEAD_DESCRIPTION"
+)