diff options
author | Kazuki Yamaguchi <k@rhe.jp> | 2016-08-18 13:55:08 +0900 |
---|---|---|
committer | Kazuki Yamaguchi <k@rhe.jp> | 2016-08-18 16:18:03 +0900 |
commit | 0fa04d370c34a57ab9533d9ea88123b00f20943f (patch) | |
tree | 555c3d68233f181cdbb9675e3453e664518327ec | |
parent | 01cf28145f7110b129a0faf699200a43adc08160 (diff) | |
download | ruby-openssl-0fa04d370c34a57ab9533d9ea88123b00f20943f.tar.gz |
Add tool/update-gh-pages
A shell script to generate RDoc HTML and update gh-pages branch.
-rwxr-xr-x | tool/update-gh-pages | 22 |
1 files changed, 22 insertions, 0 deletions
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" +) |