Skip to content

Commit

Permalink
Create task to update js files automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
kdelchev committed Jul 29, 2015
1 parent abdc08a commit dc8f9ba
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
require 'bundler'
Bundler::GemHelper.install_tasks

namespace :d3 do
desc 'Update d3 version'
task :update_version do
`curl -o app/assets/javascripts/d3.js https://raw.githubusercontent.com/mbostock/d3/master/d3.js`
`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"
end
end

0 comments on commit dc8f9ba

Please sign in to comment.