rake: extract `rake js:gulp_rev` as a distinct task

Change-Id: I0c4b687eb74937a908221155c7565c9fd5a79b99
Reviewed-on: https://gerrit.instructure.com/95331
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
This commit is contained in:
Simon Williams 2016-11-15 16:49:20 -07:00
parent 0d744a7c3e
commit a6522b28bd
2 changed files with 7 additions and 1 deletions

View File

@ -95,7 +95,8 @@ namespace :canvas do
end
combined_time = times.reduce(:+)
puts "Finished compiling assets in #{real_time}. parallelism saved #{combined_time - real_time} (#{real_time.to_f / combined_time.to_f * 100.0}%)"
raise "Error reving files" unless system('node_modules/.bin/gulp rev')
log_time("gulp rev") { Rake::Task['js:gulp_rev'].invoke }
end
end

View File

@ -230,4 +230,9 @@ namespace :js do
puts "node is: #{`node -v`.strip} (#{`which node`.strip})"
raise 'error running npm install' unless `npm install`
end
desc "Run Gulp Rev, for fingerprinting assets"
task :gulp_rev do
raise "Error reving files" unless system('node_modules/.bin/gulp rev')
end
end