diff --git a/README.md b/README.md index b7581b3..3ba5384 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ Then add it to your manifest file, most probably at `app/assets/javascripts/appl ## Development -To update D3 version in gem run rake task: +To update the D3 version contained in the gem, you can run the following rake task ```bash bundle exec rake d3:update_version ``` diff --git a/Rakefile b/Rakefile index 29530fc..545ee86 100644 --- a/Rakefile +++ b/Rakefile @@ -8,6 +8,13 @@ namespace :d3 do `curl -o app/assets/javascripts/d3.min.js https://raw.githubusercontent.com/mbostock/d3/master/d3.min.js` `cp app/assets/javascripts/d3.js app/assets/javascripts/d3.v3.js` `cp app/assets/javascripts/d3.min.js app/assets/javascripts/d3.v3.min.js` - puts "Update manually version to #{`grep 'version: ".*"' app/assets/javascripts/d3.js | cut -d '"' -f 2`}CHANGELOG.md\nREADME.md\nlib/d3/rails/version.rb\n" + version = `grep 'version: ".*"' app/assets/javascripts/d3.js | cut -d '"' -f 2`.strip + message = <<-MSG + Please update the version to #{version} manually in the following files: + * CHANGELOG.md + * README.md + * lib/d3/rails/version.rb + MSG + puts message.strip.squeeze ' ' end end