Trim Fastlane Options (#1367)
This commit is contained in:
parent
fe9a6375aa
commit
7685048258
|
@ -16,12 +16,12 @@ class Fastfile: LaneFile {
|
||||||
func testFlightLane(withOptions options: [String: String]?) {
|
func testFlightLane(withOptions options: [String: String]?) {
|
||||||
|
|
||||||
guard let options,
|
guard let options,
|
||||||
let keyID = options["keyID"],
|
let keyID = options["keyID"]?.trimOption(),
|
||||||
let issuerID = options["issuerID"],
|
let issuerID = options["issuerID"]?.trimOption(),
|
||||||
let keyContents = options["keyContents"],
|
let keyContents = options["keyContents"]?.trimOption(),
|
||||||
let scheme = options["scheme"],
|
let scheme = options["scheme"]?.trimOption(),
|
||||||
let codeSign64 = options["codeSign64"],
|
let codeSign64 = options["codeSign64"]?.trimOption(),
|
||||||
let profileName64 = options["profileName64"]
|
let profileName64 = options["profileName64"]?.trimOption()
|
||||||
else {
|
else {
|
||||||
puts(message: "ERROR: missing or incorrect options")
|
puts(message: "ERROR: missing or incorrect options")
|
||||||
exit(1)
|
exit(1)
|
||||||
|
@ -97,3 +97,12 @@ class Fastfile: LaneFile {
|
||||||
return decoded
|
return decoded
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extension String {
|
||||||
|
|
||||||
|
/// Trim the option value from whitespaces and newlines, which may
|
||||||
|
/// accidentally be present in GitHub secrets.
|
||||||
|
func trimOption() -> String {
|
||||||
|
trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Binary file not shown.
Loading…
Reference in New Issue