Skip to content

Commit 1645d41

Browse files
authored
Add shell to ExecuteAction (#1430)
* Add shell to ExecuteAction * Update to 2.38.1 * Add shell argument to jsons
1 parent 6694943 commit 1645d41

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

Sources/ProjectSpec/Scheme.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,12 @@ public struct Scheme: Equatable {
8888
public var script: String
8989
public var name: String
9090
public var settingsTarget: String?
91-
public init(name: String, script: String, settingsTarget: String? = nil) {
91+
public var shell: String?
92+
public init(name: String, script: String, shell: String? = nil, settingsTarget: String? = nil) {
9293
self.script = script
9394
self.name = name
9495
self.settingsTarget = settingsTarget
96+
self.shell = shell
9597
}
9698
}
9799

@@ -400,6 +402,7 @@ extension Scheme.ExecutionAction: JSONObjectConvertible {
400402
script = try jsonDictionary.json(atKeyPath: "script")
401403
name = jsonDictionary.json(atKeyPath: "name") ?? "Run Script"
402404
settingsTarget = jsonDictionary.json(atKeyPath: "settingsTarget")
405+
shell = jsonDictionary.json(atKeyPath: "shell")
403406
}
404407
}
405408

@@ -409,6 +412,7 @@ extension Scheme.ExecutionAction: JSONEncodable {
409412
"script": script,
410413
"name": name,
411414
"settingsTarget": settingsTarget,
415+
"shell": shell
412416
]
413417
}
414418
}

Sources/XcodeGenKit/SchemeGenerator.swift

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,12 @@ public class SchemeGenerator {
208208
.first { settingsTarget == $0.buildableReference.blueprintName }?
209209
.buildableReference
210210
}
211-
return XCScheme.ExecutionAction(scriptText: action.script, title: action.name, environmentBuildable: environmentBuildable)
211+
return XCScheme.ExecutionAction(
212+
scriptText: action.script,
213+
title: action.name,
214+
shellToInvoke: action.shell,
215+
environmentBuildable: environmentBuildable
216+
)
212217
}
213218

214219
let schemeTarget: ProjectTarget?

0 commit comments

Comments
 (0)