Created
April 8, 2010 06:33
-
-
Save amatsuda/359841 to your computer and use it in GitHub Desktop.
This file contains 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
namespace :rails do | |
namespace :freeze do | |
desc 'Lock to the current Rails 2-3-stable' | |
task :rails23 do | |
rm_rf 'vendor/rails' | |
`git clone -b 2-3-stable --depth=1 git://github.com/rails/rails.git vendor/rails` | |
chdir 'vendor/rails' do | |
latest_revision = `git log -1 --pretty=format:%H` | |
%w(.git Rakefile cleanlogs.sh pushgems.rb release.rb activemodel).each do |goner| | |
rm_rf goner | |
end | |
touch "REVISION_#{latest_revision}" | |
end | |
puts 'Updating current scripts, javascripts, and configuration settings' | |
Rake::Task['rails:update'].invoke | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment