@@ -11,16 +11,43 @@ force:
1111Submodule : force
1212 git submodule update --recursive --remote
1313 git add $@
14- git commit -m " Update $$ (git submodule status Submodule/github/rest-api-description)" || true
14+ git commit -m " [Make] Pull $$ (git submodule status Submodule/github/rest-api-description)" || true
15+ echo " ::notice:: make $@ "
1516
1617OPENAPI_FILES := $(addsuffix /openapi.yml, $(SUBDIRS ) )
17- Sources/ % /openapi.yml : Submodule
18+ % /openapi.yml : Submodule
1819 ln -sf ../../Submodule/github/rest-api-description/descriptions/api.github.com/api.github.com.yaml $@
1920 git add $@
20- git commit -m " Relink $@ " || true
2121
22- .PHONY : install
23- install : $(OPENAPI_FILES )
22+ SWIFT_FILES := $(addsuffix /Client.swift, $(SUBDIRS ) )
23+ % .swift : $(OPENAPI_FILES )
24+ mint run apple/swift-openapi-generator generate $(@D ) /openapi.yml \
25+ --config $(@D ) /openapi-generator-config.yml \
26+ --output-directory $(@D )
27+ git add $@ $(@D ) /Types.swift
28+
29+ install-files : $(SWIFT_FILES )
30+ git commit -m " [Make] Re-link openapi.yml & re-gen swift files." || true
31+ echo " ::notice:: make $@ "
32+
33+ # XCFrameworks:
34+ # mint run giginet/Scipio create . \
35+ # --embed-debug-symbols \
36+ # --support-simulators
37+ # echo "::notice:: make $@"
38+ #
39+ # XCFRAMEWORKS := $(wildcard XCFrameworks/*.xcframework)
40+ # ZIP_FILES := $(XCFRAMEWORKS:%.xcframework=%.zip)
41+ # %.zip: %.xcframework
42+ # zip -r "$@" "$^"
43+ # rm -rf "$^"
44+ # git add "$@"
45+ #
46+ # install-zips: XCFrameworks $(ZIP_FILES)
47+ # git commit -m "[Make] Re-gen framework zips" || true
48+ # echo "::notice:: make $@"
49+
50+ install : install-files
2451
2552.build/docs : # # Need env GITHUB_PAGES is created as 'true'
2653 swift package --allow-writing-to-directory $@ generate-documentation \
0 commit comments