Class: Fastlane::Actions::SnapshotAction
Class Method Summary
collapse
action_name, details, output, sh
Class Method Details
.author ⇒ Object
54
55
56
|
# File 'lib/fastlane/actions/snapshot.rb', line 54
def self.author
"KrauseFx"
end
|
.available_options ⇒ Object
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/fastlane/actions/snapshot.rb', line 39
def self.available_options
[
FastlaneCore::ConfigItem.new(key: :noclean,
env_name: "FL_SNAPSHOT_NO_CLEAN",
description: "Skips the clean process when building the app",
is_string: false,
default_value: false),
FastlaneCore::ConfigItem.new(key: :verbose,
env_name: "FL_SNAPSHOT_VERBOSE",
description: "Print out the UI Automation output",
is_string: false,
default_value: false)
]
end
|
.description ⇒ Object
35
36
37
|
# File 'lib/fastlane/actions/snapshot.rb', line 35
def self.description
"Generate new localised screenshots on multiple devices"
end
|
.is_supported?(platform) ⇒ Boolean
58
59
60
|
# File 'lib/fastlane/actions/snapshot.rb', line 58
def self.is_supported?(platform)
platform == :ios
end
|
.run(params) ⇒ Object
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/fastlane/actions/snapshot.rb', line 8
def self.run(params)
$verbose = true if params[:verbose]
clean = !params[:noclean]
if Helper.test?
Actions.lane_context[SharedValues::SNAPSHOT_SCREENSHOTS_PATH] = Dir.pwd
return clean
end
require 'snapshot'
FastlaneCore::UpdateChecker.start_looking_for_update('snapshot') unless Helper.is_test?
begin
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) end
ensure
FastlaneCore::UpdateChecker.show_update_status('snapshot', Snapshot::VERSION)
end
end
|