File tree Expand file tree Collapse file tree 2 files changed +15
-7
lines changed
Expand file tree Collapse file tree 2 files changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -20,10 +20,18 @@ commit:
2020 && echo " ::notice::git commit $( file) " \
2121 || true ;
2222
23- .PHONY : swift-openapi-generator
24- swift-openapi-generator :
23+ SWIFT_BUILD_FLAGS = -c release --arch arm64 --arch x86_64
24+ EXECUTABLE_NAME = swift-openapi-generator
25+ EXECUTABLE_PATH = $(shell swift build $(SWIFT_BUILD_FLAGS ) --show-bin-path) /$(EXECUTABLE_NAME )
26+ .NOTPARALLEL : .build/bin/swift-openapi-generator
27+ .build/bin/swift-openapi-generator :
2528 @echo " ::debug::make: $@ "
26- mise use spm:apple/swift-openapi-generator
29+ git clone --branch 1.11.0 --single-branch \
30+ https://github.com/apple/swift-openapi-generator
31+ cd swift-openapi-generator; swift build $(SWIFT_BUILD_FLAGS ) ;
32+ mkdir -p $(@D ) ;
33+ cp -f $(EXECUTABLE_PATH ) $@ ; \
34+ rm -rf swift-openapi-generator;
2735
2836# # Generate Sources
2937
4856$(OPENAPI_PATH ) : Submodule
4957 @touch " $@ "
5058
51- % /Client.swift % /Types.swift : $(OPENAPI_PATH ) % /openapi-generator-config.yml
59+ % /Client.swift % /Types.swift : $(OPENAPI_PATH ) % /openapi-generator-config.yml .build/bin/swift-openapi-generator
5260 @echo " ::debug::make: $@ "
53- swift-openapi-generator generate \
61+ .build/bin/ swift-openapi-generator generate \
5462 " $( OPENAPI_PATH) " \
5563 --config " $( @D) /openapi-generator-config.yml" \
5664 --output-directory " $( @D) " ;
Original file line number Diff line number Diff line change 11[tools ]
22# swift = "6"
3- "spm:apple/swift-openapi-generator" = " latest"
3+ # "spm:apple/swift-openapi-generator" = "latest"
44
55[settings ]
6- experimental = true
6+ # experimental = true
You can’t perform that action at this time.
0 commit comments