Skip to content

Commit

Permalink
Merge 293d353 into 423b73c
Browse files Browse the repository at this point in the history
  • Loading branch information
svenfuchs committed Aug 19, 2019
2 parents 423b73c + 293d353 commit c705c54
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
12 changes: 7 additions & 5 deletions lib/dpl/providers/script.rb
Expand Up @@ -6,9 +6,9 @@ class Script < Provider
summary 'Minimal provider that executes a custom command'

description sq(<<-str)
This deployment provider executes a single, custom command. This is
usually a script that is contained in your repository, but it can be
any command executable in the build environment.
This deployment provider executes custom commands. This is usually a
single script that is contained in your repository, but it can be any
command executable in the build environment.
It is possible to pass arguments to a script deployment like so:
Expand All @@ -18,10 +18,12 @@ class Script < Provider
status.
str

opt '-s', '--script SCRIPT', 'The script to execute', required: true
opt '-s', '--script SCRIPT', 'The script to execute', type: :array, required: true

def deploy
shell script, assert: 'Script failed with status %{status}'
script.each do |script|
shell script, assert: 'Script failed with status %{status}'
end
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/dpl/providers/script_spec.rb
Expand Up @@ -3,8 +3,8 @@

before { subject.run }

describe 'given --script ./script' do
it { should have_run './script' }
describe 'given --script ./one --script ./two' do
it { should have_run './one' }
it { should have_run './two' }
end
end

0 comments on commit c705c54

Please sign in to comment.