Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added ability to name the executable target in schemes. (yonaskolb#866)
Browse files Browse the repository at this point in the history
```
schemes:
  MyScheme:
    build:
      executable: MyExecutable
      targets:
      ...
```
elland authored and Igor Ranieri Elland committed May 28, 2020

Verified

This commit was signed with the committer’s verified signature.
renovate-bot Mend Renovate
1 parent eda0e39 commit 46d3de0
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Sources/ProjectSpec/Scheme.swift
Original file line number Diff line number Diff line change
@@ -114,9 +114,11 @@ public struct Scheme: Equatable {
public var launchAutomaticallySubstyle: String?
public var debugEnabled: Bool
public var simulateLocation: SimulateLocation?
public var executableName: String?

public init(
config: String,
executableName: String? = nil,
commandLineArguments: [String: Bool] = [:],
preActions: [ExecutionAction] = [],
postActions: [ExecutionAction] = [],
2 changes: 1 addition & 1 deletion Sources/XcodeGenKit/SchemeGenerator.swift
Original file line number Diff line number Diff line change
@@ -163,7 +163,7 @@ public class SchemeGenerator {

let schemeTarget: Target?

if let targetName = scheme.build.executableName {
if let targetName = scheme.run?.executableName {
schemeTarget = project.getTarget(targetName)
} else {
schemeTarget = target ?? project.getTarget(scheme.build.targets.first!.target.name)

0 comments on commit 46d3de0

Please sign in to comment.