forked from defunkt/repl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
43 lines (37 loc) · 845 Bytes
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
$LOAD_PATH.unshift 'lib'
require "repl/version"
def version
Repl::VERSION
end
def git(command)
system("git #{command}")
end
desc "Build manual"
task :build_man do
sh "ronn -br5 --organization=DEFUNKT man/*.ronn"
end
desc "Build and show manual"
task :man => :build_man do
exec "man man/repl.1"
end
desc "Push a new version to Gemcutter"
task :publish do
git "tag v#{version}"
git "push origin v#{version}"
git "push origin master"
git "push origin master:latest"
sh "gem build repl.gemspec"
sh "gem push repl-#{version}.gem"
git "clean -fd"
exec "rake pages"
end
desc "Publish to GitHub Pages"
task :pages => [ :build_man ] do
cp "man/repl.1.html", "html"
git "checkout gh-pages"
mv "html", "index.html"
git "commit -a -m 'update docs'"
git "push origin gh-pages"
git "checkout master"
puts :done
end