debian-image-builder-frontend/api.sh
lucasgarfield 7982ec4981 api: Modify api.sh so it downloads image builder api spec
Use curl to download `api.yaml` from `osbuild/image-builder` in
`api.sh`.

Now we do not need to manually download `api.yaml` from `image-builder`
before running `npm run api`.
2024-01-22 15:31:33 +01:00

15 lines
614 B
Bash

#!/bin/bash
# Download the most up-to-date imageBuilder.yaml file and overwrite the existing one
curl https://raw.githubusercontent.com/osbuild/image-builder/main/internal/v1/api.yaml -o ./api/schema/imageBuilder.yaml
# Run commands in the background using & operator
npx @rtk-query/codegen-openapi ./api/config/imageBuilder.ts &
npx @rtk-query/codegen-openapi ./api/config/rhsm.ts &
npx @rtk-query/codegen-openapi ./api/config/contentSources.ts &
npx @rtk-query/codegen-openapi ./api/config/provisioning.ts &
npx @rtk-query/codegen-openapi ./api/config/edge.ts &
# Wait for all background jobs to finish
wait