Permalink
Browse files

Add a build task

  • Loading branch information...
1 parent 60907f9 commit 895154d508eadb598cee1cd0784418848f2bb048 @wycats wycats committed Aug 17, 2010
Showing with 22 additions and 1 deletion.
  1. +22 −1 Rakefile
View
@@ -1,3 +1,5 @@
+require "bundler/setup"
+
desc "Install oniguruma"
task :install_onig do
if `which wget`.empty?
@@ -25,6 +27,25 @@ task :man do
FileUtils.mkdir_p("site/man")
Dir.chdir("bundler") { system "ronn -5 man/*.ronn" }
- FileUtils.mv(Dir["bundler/man/*.html"], "site/man")
+ FileUtils.cp(Dir["bundler/man/*.html"], "site/man")
+end
+
+task :build do
+ system "staticmatic build ."
+end
+
+task :release => [:build, :man] do
+ if File.exists?("gh-pages")
+ Dir.chdir("gh-pages") { system "git pull" }
+ else
+ system "git clone git://github.com/carlhuda/bundler.git gh-pages --branch gh-pages"
+ end
+
+ Dir.chdir("gh-pages") do
+ system "rm -rf *"
+ File.open("CNAME", "w") { |file| file.puts "gembundler.com" }
+ system "cp -r ../site/* ."
+ # system "git push origin gh-pages"
+ end
end

0 comments on commit 895154d

Please sign in to comment.