Skip to content

Commit

Permalink
Merge pull request #1044 from travis-ci/sf-port-949
Browse files Browse the repository at this point in the history
add firebase --force (ports #949)
  • Loading branch information
svenfuchs committed Aug 21, 2019
2 parents 74806dd + 28fd1ea commit 2053d20
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/dpl/providers/firebase.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Firebase < Provider
opt '--project NAME', 'Firebase project to deploy to (defaults to the one specified in your firebase.json)'
opt '--message MSG', 'Message describing this deployment.'
opt '--only SERVICES', 'Firebase services to deploy', note: 'can be a comma-separated list'
opt '--force', 'Whether or not to delete Cloud Functions missing from the current working directory'

cmds deploy: 'firebase deploy --non-interactive %{deploy_opts}'
errs deploy: 'Firebase deployment failed'
Expand All @@ -33,7 +34,7 @@ def deploy
end

def deploy_opts
opts_for(%i(project message token only))
opts_for(%i(project message token only force))
end
end
end
Expand Down
5 changes: 5 additions & 0 deletions spec/dpl/providers/firebase_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@
before { subject.run }
it { should have_run 'firebase deploy --non-interactive --token="token" --only="only"' }
end

describe 'given --force' do
before { subject.run }
it { should have_run 'firebase deploy --non-interactive --token="token" --force' }
end
end

describe 'missing firebase.json' do
Expand Down

0 comments on commit 2053d20

Please sign in to comment.