Sha256: 8d2676cc2e2e1c460e9934007a74120e636522a6c9c3a7253312d1aa24b50fd3

Contents?: true

Size: 1.45 KB

Versions: 3

Compression:

Stored size: 1.45 KB

Contents

module Fastlane
  module Actions
    module SharedValues
      SNAPSHOT_SCREENSHOTS_PATH = :SNAPSHOT_SCREENSHOTS_PATH
    end

    class CaptureIosScreenshotsAction < Action
      def self.run(params)
        return nil unless Helper.mac?
        require 'snapshot'

        Snapshot.config = params
        Snapshot::DependencyChecker.check_simulators
        Snapshot::Runner.new.work

        Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH] = File.expand_path(params[:output_directory]) # absolute URL

        true
      end

      def self.description
        "Generate new localized screenshots on multiple devices (via _snapshot_)"
      end

      def self.available_options
        return [] unless Helper.mac?
        require 'snapshot'
        Snapshot::Options.available_options
      end

      def self.output
        [
          ['SNAPSHOT_SCREENSHOTS_PATH', 'The path to the screenshots']
        ]
      end

      def self.author
        "KrauseFx"
      end

      def self.is_supported?(platform)
        [:ios, :mac].include?(platform)
      end

      def self.example_code
        [
          'capture_ios_screenshots',
          'snapshot # alias for "capture_ios_screenshots"',
          'capture_ios_screenshots(
            skip_open_summary: true,
            clean: true
          )'
        ]
      end

      def self.category
        :screenshots
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
fastlane_hotfix-2.165.1 fastlane/lib/fastlane/actions/capture_ios_screenshots.rb
fastlane_hotfix-2.165.0 fastlane/lib/fastlane/actions/capture_ios_screenshots.rb
fastlane_hotfix-2.187.0 fastlane/lib/fastlane/actions/capture_ios_screenshots.rb