Skip to content

Instantly share code, notes, and snippets.

@amatsuda
Created April 8, 2010 06:33
Show Gist options
  • Save amatsuda/359841 to your computer and use it in GitHub Desktop.
Save amatsuda/359841 to your computer and use it in GitHub Desktop.
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