Skip to content

Commit 05c9e31

Browse files
committed
adding rakefile with dox task
1 parent fabc277 commit 05c9e31

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

Rakefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# The Rakefile only has one task. The description is pretty good.
2+
desc "Generate documentation, and put it in the gh-pages branch"
3+
task :dox do
4+
# First, we want to stash any changes. We only want stuff that's committed!
5+
sh "git stash"
6+
7+
# Next, we need to run rocco.
8+
sh "rocco *.rb"
9+
10+
# Then we want to stash the html we made, but first, we have to add it.
11+
sh "git add *.html"
12+
sh "git stash"
13+
14+
# Next we switch to our documentation branch, and then pop it.
15+
sh "git checkout gh-pages"
16+
sh "git stash pop"
17+
18+
# Now we commit up!
19+
sh "git add ."
20+
sh "git commit -m 'Documentation generated #{Time.now}'"
21+
22+
# Now that that's over, let's return to master, and pop our changes.
23+
sh "git checkout master"
24+
sh "git stash pop"
25+
end

0 commit comments

Comments
 (0)