-
-
Notifications
You must be signed in to change notification settings - Fork 200
/
Makefile
14 lines (12 loc) · 777 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# Downloads latest spec and Regenerates source code
.PHONY: update
update: download generate
# Grabs the latest spec and perform some manual coersion to fix errors
# see https://github.com/AvdLee/appstoreconnect-swift-sdk/pull/197
.PHONY: download
download:
curl -fsSL -o - https://developer.apple.com/sample-code/app-store-connect/app-store-connect-openapi-specification.zip | bsdtar -xOf - | jq '.components.schemas.BundleIdPlatform.enum |= [ "IOS", "MAC_OS", "UNIVERSAL", "SERVICES" ] | del(.["x-important"]) | del(.. |."enum"? | select(. != null and length == 0))' > Sources/OpenAPI/app_store_connect_api.json
# Runs the CreateAPI generator to update generated source code
.PHONY: generate
generate:
swift package --allow-writing-to-package-directory generate-open-api