Sha256: 1a14a9c65185e0c8aac8ac1ca2a32cfcbceeddd1b1df10612ec749ac6c863e61

Contents?: true

Size: 1.17 KB

Versions: 4

Compression:

Stored size: 1.17 KB

Contents

module Dpl
  module Providers
    class Firebase < Provider
      status :alpha

      description sq(<<-str)
        tbd
      str

      node_js '>= 8.0.0'

      npm 'firebase-tools@^6.3', 'firebase'

      path 'node_modules/.bin'

      env :firebase

      opt '--token TOKEN',   'Firebase CI access token (generate with firebase login:ci)', required: true, secret: true
      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'
      msgs missing_config: 'Missing firebase.json'

      def validate
        error :missing_config unless File.exists?('firebase.json')
      end

      def deploy
        shell :deploy
      end

      def deploy_opts
        opts_for(%i(project message token only force))
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dpl-2.0.0.alpha.6 lib/dpl/providers/firebase.rb
dpl-2.0.0.alpha.5 lib/dpl/providers/firebase.rb
dpl-2.0.0.alpha.2 lib/dpl/providers/firebase.rb
dpl-2.0.0.alpha.1 lib/dpl/providers/firebase.rb