rake -T is useful
This adds the desc to each rake task so rake -T gives useful information. Change-Id: I5af5d18361f481c36d853b9fb474c0dcaa942b1a
This commit is contained in:
parent
7c43f00c97
commit
126623623e
5
Rakefile
5
Rakefile
|
@ -2,22 +2,27 @@ task default: ["test"]
|
||||||
|
|
||||||
task :test => [:lint, :style, :unit]
|
task :test => [:lint, :style, :unit]
|
||||||
|
|
||||||
|
desc "Vendor the cookbooks in the Berksfile"
|
||||||
task :berks_prep do
|
task :berks_prep do
|
||||||
sh %{chef exec berks vendor}
|
sh %{chef exec berks vendor}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Run FoodCritic (lint) tests"
|
||||||
task :lint do
|
task :lint do
|
||||||
sh %{chef exec foodcritic --epic-fail any --tags ~FC003 --tags ~FC023 .}
|
sh %{chef exec foodcritic --epic-fail any --tags ~FC003 --tags ~FC023 .}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Run RuboCop (style) tests"
|
||||||
task :style do
|
task :style do
|
||||||
sh %{chef exec rubocop}
|
sh %{chef exec rubocop}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Run RSpec (unit) tests"
|
||||||
task :unit => :berks_prep do
|
task :unit => :berks_prep do
|
||||||
sh %{chef exec rspec --format documentation}
|
sh %{chef exec rspec --format documentation}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
desc "Remove the berks-cookbooks directory and the Berksfile.lock"
|
||||||
task :clean do
|
task :clean do
|
||||||
rm_rf [
|
rm_rf [
|
||||||
'berks-cookbooks',
|
'berks-cookbooks',
|
||||||
|
|
Loading…
Reference in New Issue