File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,20 @@ struct LaunchXcode: CommandPlugin {
20
20
print ( " This command is only supported on macOS " )
21
21
return
22
22
#else
23
- let buildResult = try packageManager. build ( . all( includingTests: false ) , parameters: . init( echoLogs: true ) )
23
+ var args = ArgumentExtractor ( arguments)
24
+ var configuration : PackageManager . BuildConfiguration = . debug
25
+ // --release
26
+ if args. extractFlag ( named: " release " ) > 0 {
27
+ configuration = . release
28
+ } else {
29
+ // --configuration release
30
+ let configurationOptions = args. extractOption ( named: " configuration " )
31
+ if configurationOptions. contains ( " release " ) {
32
+ configuration = . release
33
+ }
34
+ }
35
+
36
+ let buildResult = try packageManager. build ( . all( includingTests: false ) , parameters: . init( configuration: configuration, echoLogs: true ) )
24
37
guard buildResult. succeeded else { return }
25
38
guard let buildServiceURL = buildResult. builtArtifacts. map ( { $0. url } ) . filter ( { $0. lastPathComponent == " SWBBuildServiceBundle " } ) . first else {
26
39
print ( " Failed to determine path to built SWBBuildServiceBundle " )
You can’t perform that action at this time.
0 commit comments