-
Notifications
You must be signed in to change notification settings - Fork 2
/
Fastfile
45 lines (37 loc) · 1.23 KB
/
Fastfile
1
2
3
4
5
6
7
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
34
35
36
37
38
39
40
41
42
43
44
45
# opt_out_usage
desc "Example of reading xcconfig file"
lane :read do
# Read basic xcconfig.
json = read_xcconfig(
path: "spec/fixtures/configs/basic.xcconfig"
)
# Output is a JSON string.
config = JSON.parse(json)
UI.message("basic.xcconfig value for key 'A': #{config['A']}")
UI.message("basic.xcconfig value for key 'B3': #{config['B3']}")
# Read xcconfig using parent xcconfig to simulate xcode inheritance.
json = read_xcconfig(
path: "spec/fixtures/configs/inheritance.xcconfig",
parent: "spec/fixtures/configs/parent.xcconfig"
)
config = JSON.parse(json)
UI.message("inheritance.xcconfig value for key 'A1': #{config['A1']}")
UI.message("inheritance.xcconfig value for key 'B3': #{config['B3']}")
end
desc "Example of mapping build settings to build flags"
lane :build_flags do
read_xcconfig(path: "spec/fixtures/configs/build_flags/basic.xcconfig")
build_flags = build_settings_to_flags
puts(build_flags)
end
desc "Example of validating xcconfig file"
lane :validate do
issues = validate_xcconfig(
path: "spec/fixtures/configs/validate/all_issues.xcconfig",
root_path: "spec/fixtures/configs/validate"
)
issues.each do |issue|
UI.important(issue)
end
end
import("DevFastfile")