Sha256: 1bb2fc19458af00302c04b67c3618fd9e83f58bc4d606417529d53573611b491

Contents?: true

Size: 863 Bytes

Versions: 19

Compression:

Stored size: 863 Bytes

Contents

module Fastlane
  module Actions
    module SharedValues
      SNAPSHOT_SCREENSHOTS_PATH = :SNAPSHOT_SCREENSHOTS_PATH
    end

    class SnapshotAction
      def self.run(params)
        clean = true
        clean = false if params.include?(:noclean)
        $verbose = true if params.include?(:verbose)

        if Helper.test?
          Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH] = Dir.pwd
          return clean
        end

        require 'snapshot'

        Dir.chdir(FastlaneFolder.path) do
          Snapshot::SnapshotConfig.shared_instance
          Snapshot::Runner.new.work(clean: clean)

          results_path = Snapshot::SnapshotConfig.shared_instance.screenshots_path

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

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
fastlane-0.6.1 lib/fastlane/actions/snapshot.rb
fastlane-0.6.0 lib/fastlane/actions/snapshot.rb
fastlane-0.5.0 lib/fastlane/actions/snapshot.rb
fastlane-0.4.2 lib/fastlane/actions/snapshot.rb
fastlane-0.4.1 lib/fastlane/actions/snapshot.rb
fastlane-0.4.0 lib/fastlane/actions/snapshot.rb
fastlane-0.3.0 lib/fastlane/actions/snapshot.rb
fastlane-0.2.1 lib/fastlane/actions/snapshot.rb
fastlane-0.2.0 lib/fastlane/actions/snapshot.rb
fastlane-0.1.19 lib/fastlane/actions/snapshot.rb
fastlane-0.1.18 lib/fastlane/actions/snapshot.rb
fastlane-0.1.17 lib/fastlane/actions/snapshot.rb
fastlane-0.1.16 lib/fastlane/actions/snapshot.rb
fastlane-0.1.15 lib/fastlane/actions/snapshot.rb
fastlane-0.1.14 lib/fastlane/actions/snapshot.rb
fastlane-0.1.13 lib/fastlane/actions/snapshot.rb
fastlane-0.1.12 lib/fastlane/actions/snapshot.rb
fastlane-0.1.10 lib/fastlane/actions/snapshot.rb
fastlane-0.1.9 lib/fastlane/actions/snapshot.rb