Created
January 28, 2010 17:43
-
-
Save revans/288960 to your computer and use it in GitHub Desktop.
Build a gem, using jeweler, based on a branch.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Install Gem based on a branch (e.g. rake gemify[master] or rake gemify)." | |
task :gemify, :branch do |task, args| | |
branch = args[:branch].nil? || args[:branch] == '' ? 'master' : args[:branch] | |
puts "Going to checkout the #{branch} branch and build the gem for it." | |
# run commands | |
`rm -rf package` | |
`git checkout master` | |
`git pull origin #{branch}` | |
`git checkout #{branch}` | |
`rake build` | |
`rake install` | |
# let the user know it is completed | |
puts "Completed." | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment