Sha256: 203e5be1f09558a321605fb48de37e9b267d78275b554b5c192cc60109638fc1

Contents?: true

Size: 824 Bytes

Versions: 18

Compression:

Stored size: 824 Bytes

Contents

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

18 entries across 18 versions & 1 rubygems

Version Path
dpl-firebase-1.10.3.travis.3021.6 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.4.travis.3022.6 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.3 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.3.travis.3020.6 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.3.travis.3017.6 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.3.travis.3014.6 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.2 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.3.travis.3002.6 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.2.travis.2993.6 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.2.travis.2992.6 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.2.travis.2987.6 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.2.travis.2979.6 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.2.travis.2976.6 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.1 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.2.travis.2966.6 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.1.travis.2957.6 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.1.travis.2956.6 lib/dpl/provider/firebase.rb
dpl-firebase-1.10.1.travis.2947.6 lib/dpl/provider/firebase.rb