Permalink
Browse files

improve Rakefile

  • Loading branch information...
1 parent 2eb77ca commit c03853cb608afad7391a02bc36d89ec6d7a3716b @gutenye committed Feb 3, 2012
Showing with 15 additions and 12 deletions.
  1. +14 −11 Rakefile
  2. +1 −1 lib/rag/version.rb
View
25 Rakefile
@@ -1,40 +1,43 @@
+sudo = Process.pid==0 ? "" : "sudo"
+
desc "build a gem file"
task :release do
- sh "gem build rag.gemspec"
- sh "gem push *.gem"
- sh "rm *.gem"
+ run "gem build rag.gemspec"
+ run "gem push *.gem"
+ run "#{sudo} gem install *.gem"
+ run "rm *.gem"
end
desc "install a gem file"
task :install do
- sh "gem build rag.gemspec"
- sh "gem install *.gem"
- sh "rm *.gem"
+ run "gem build rag.gemspec"
+ run "#{sudo} gem install *.gem"
+ run "rm *.gem"
end
desc "autotest with watchr"
task :test do
- sh "watchr rag.watchr"
+ run "watchr rag.watchr"
end
desc "testing the libraray"
namespace :test do
task :all do
- sh "rspec spec"
+ run "rspec spec"
end
end
desc "run yard server --reload"
task :doc do
- sh "yard server --reload"
+ run "yard server --reload"
end
desc "clean up"
task :clean do
- `rm *.gem`
+ run "rm *.gem"
end
-def sh cmd
+def run cmd
puts cmd
system cmd
end
View
2 lib/rag/version.rb
@@ -1,3 +1,3 @@
class Rag
- VERSION = "1.2.0"
+ VERSION = "1.2.1"
end

0 comments on commit c03853c

Please sign in to comment.