Sha256: d094fa6b91cd61aee5fb1b0e2a651bd971bf896b6626e6d5cf187259e34f5e9a

Contents?: true

Size: 824 Bytes

Versions: 30

Compression:

Stored size: 824 Bytes

Contents

module DPL
  class Provider
    class Firebase < Provider
      npm_g 'firebase-tools@^6.3', '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

30 entries across 30 versions & 1 rubygems

Version Path
dpl-firebase-1.10.11.travis.3497.5 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.10 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.9 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.9.travis.3280.5 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.9.travis.3258.5 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.8 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.8.travis.3236.5 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.8.travis.3216.5 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.7 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.8.travis.3178.5 lib/dpl/provider/firebase.rb