Skip to content

Commit

Permalink
Make rails gem build directory consistent with actionpack, etc.
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Marshall & Sean Moon committed Aug 4, 2011
1 parent cb6a082 commit 343daf3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions tasks/release.rb
Expand Up @@ -4,11 +4,11 @@
version = File.read("#{root}/RAILS_VERSION").strip
tag = "v#{version}"

directory "dist"
directory "pkg"

(FRAMEWORKS + ['rails']).each do |framework|
namespace framework do
gem = "dist/#{framework}-#{version}.gem"
gem = "pkg/#{framework}-#{version}.gem"
gemspec = "#{framework}.gemspec"

task :clean do
Expand Down Expand Up @@ -41,10 +41,10 @@
File.open(file, 'w') { |f| f.write ruby }
end

task gem => %w(update_version_rb dist) do
task gem => %w(update_version_rb pkg) do
cmd = ""
cmd << "cd #{framework} && " unless framework == "rails"
cmd << "gem build #{gemspec} && mv #{framework}-#{version}.gem #{root}/dist/"
cmd << "gem build #{gemspec} && mv #{framework}-#{version}.gem #{root}/pkg/"
sh cmd
end

Expand Down Expand Up @@ -104,14 +104,14 @@
end

task :commit do
File.open('dist/commit_message.txt', 'w') do |f|
File.open('pkg/commit_message.txt', 'w') do |f|
f.puts "# Preparing for #{version} release\n"
f.puts
f.puts "# UNCOMMENT THE LINE ABOVE TO APPROVE THIS COMMIT"
end

sh "git add . && git commit --verbose --template=dist/commit_message.txt"
rm_f "dist/commit_message.txt"
sh "git add . && git commit --verbose --template=pkg/commit_message.txt"
rm_f "pkg/commit_message.txt"
end

task :tag do
Expand Down

0 comments on commit 343daf3

Please sign in to comment.