Allow SINGLE_PLUGIN environment variable to be used

This commit is contained in:
David Taylor 2017-08-18 22:04:35 +01:00
parent ea43f50f6d
commit 7704e8246b
1 changed files with 11 additions and 4 deletions

View File

@ -35,11 +35,18 @@ end
desc 'Run JS and Ruby linters'
task 'docker:lint' do
success = run_or_fail("bundle exec rubocop --parallel")
success = run_or_fail("eslint app/assets/javascripts test/javascripts")
success = run_or_fail("eslint --ext .es6 app/assets/javascripts test/javascripts plugins")
success = true
exit 1 if !success
if ENV["SINGLE_PLUGIN"]
success &&= run_or_fail("bundle exec rubocop --parallel plugins/#{ENV["SINGLE_PLUGIN"]}")
success &&= run_or_fail("eslint --ext .es6 plugins/#{ENV['SINGLE_PLUGIN']}")
else
success &&= run_or_fail("bundle exec rubocop --parallel") unless ENV["SKIP_CORE"]
success &&= run_or_fail("eslint app/assets/javascripts test/javascripts") unless ENV["SKIP_CORE"]
success &&= run_or_fail("eslint --ext .es6 app/assets/javascripts test/javascripts plugins") unless ENV["SKIP_PLUGINS"]
end
exit 1 unless success
end
desc 'Run all tests (JS and code in a standalone environment)'