Add Make unstable generation (#27)

This commit is contained in:
Ethan Pippin 2023-11-02 12:18:04 -06:00 committed by GitHub
parent 70c2fdec39
commit 337faf3820
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View File

@ -25,7 +25,7 @@ jobs:
- name: Generate API
run: |
cd $GITHUB_WORKSPACE
make update
make update-unstable
- name: Commit changes
run: |
@ -34,4 +34,4 @@ jobs:
git checkout -B unstable
git add .
git commit --allow-empty -m "Update unstable generation"
git push --force origin openapi-unstable
git push --force origin unstable

View File

@ -10,4 +10,13 @@ download:
# Run CreateAPI
.PHONY: generate
generate:
swift package --allow-writing-to-package-directory generate-api
swift package --allow-writing-to-package-directory generate-api
# Download latest unstable spec and run CreateAPI
.PHONY: update-unstable
update-unstable: download-unstable generate
# Donload the latest Jellyfin unstable spec
.PHONY: download-unstable
download-unstable:
curl -fsSL https://repo.jellyfin.org/releases/openapi/jellyfin-openapi-unstable.json -o Sources/jellyfin-openapi-stable.json