Sha256: b9518c3c22079ea6134095b5b7bd4742ff443144fc8480de34b2e8bd446bf467

Contents?: true

Size: 1.44 KB

Versions: 7

Compression:

Stored size: 1.44 KB

Contents

module Fastlane
  module Actions
    module SharedValues
      SCREENGRAB_OUTPUT_DIRECTORY = :SCREENGRAB_OUTPUT_DIRECTORY
    end

    class ScreengrabAction < Action
      def self.run(params)
        UI.user_error! "screengrab currently only supports running on a Mac" unless Helper.mac?
        require 'screengrab'

        begin
          FastlaneCore::UpdateChecker.start_looking_for_update('screengrab') unless Helper.is_test?

          Screengrab.config = params
          Screengrab.android_environment = Screengrab::AndroidEnvironment.new(params[:android_home],
                                                                              params[:build_tools_version])
          Screengrab::DependencyChecker.check(Screengrab.android_environment)
          Screengrab::Runner.new.run

          Actions.lane_context[SharedValues::SCREENGRAB_OUTPUT_DIRECTORY] = File.expand_path(params[:output_directory])

          true
        ensure
          FastlaneCore::UpdateChecker.show_update_status('screengrab', Screengrab::VERSION)
        end
      end

      def self.description
        'Automated localized screenshots of your Android app on every device'
      end

      def self.available_options
        require 'screengrab'
        Screengrab::Options.available_options
      end

      def self.author
        ['asfalcone', 'i2amsam', 'mfurtak']
      end

      def self.is_supported?(platform)
        platform == :android
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
fastlane-1.64.0 lib/fastlane/actions/screengrab.rb
fastlane-1.63.1 lib/fastlane/actions/screengrab.rb
fastlane-1.63.0 lib/fastlane/actions/screengrab.rb
fastlane-1.62.0 lib/fastlane/actions/screengrab.rb
fastlane-1.61.0 lib/fastlane/actions/screengrab.rb
fastlane-1.60.0 lib/fastlane/actions/screengrab.rb
fastlane-1.59.0 lib/fastlane/actions/screengrab.rb