Sha256: cc4f06dc1a5f328ff65553924c99cd56ec4853681e91d8f4e877261c824d5440

Contents?: true

Size: 824 Bytes

Versions: 4

Compression:

Stored size: 824 Bytes

Contents

module DPL
  class Provider
    class Firebase < Provider
      npm_g 'firebase-tools@^6.1', 'firebase'

      def check_auth
        raise Error, "must supply token option or FIREBASE_TOKEN environment variable" if !options[:token] && !context.env['FIREBASE_TOKEN']
      end

      def check_app
        error "missing firebase.json" unless File.exist? "firebase.json"
      end

      def needs_key?
        false
      end

      def push_app
        command = "firebase deploy --non-interactive"
        command << " --project #{options[:project]}" if options[:project]
        command << " --message '#{options[:message]}'" if options[:message]
        command << " --token '#{options[:token]}'" if options[:token]
        context.shell command or raise Error, "Firebase deployment failed"
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dpl-firebase-1.10.7.travis.3177.5 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.7.travis.3151.5 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.7.travis.3128.5 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.7.travis.3126.5 lib/dpl/provider/firebase.rb