Skip to content
Browse files

parameterize write_version task

  • Loading branch information...
1 parent 0b580f2 commit b3a8290d709eb811bfb288d7b8cb74601b3c3a1e @dchelimsky dchelimsky committed Mar 15, 2010
Showing with 4 additions and 4 deletions.
  1. +4 −4 Rakefile
View
8 Rakefile
@@ -31,13 +31,13 @@ end
namespace :gem do
desc "Write out a new version constant for each project. You must supply VERSION"
- task :write_version do
- raise("You must supply VERSION") unless ENV["VERSION"]
+ task :write_version, :version do |t, args|
+ raise("You must supply VERSION") unless args[:version]
Projects.each do |project|
file = "repos/#{project}/VERSION"
FileUtils.rm_rf file
- File.open(file, "w+") { |f| f << ENV["VERSION"] }
- puts "Writing out version #{ENV['VERSION']} for #{project}"
+ File.open(file, "w+") { |f| f << args[:version] }
+ puts "Writing out version #{args[:version]} for #{project}"
end
end

0 comments on commit b3a8290

Please sign in to comment.
Something went wrong with that request. Please try again.