okospaceapi/generate-spaceapi-types.sh
Aaron Fischer e6e8aadd7c
All checks were successful
/ docker-image (push) Successful in 1m31s
/ deployment (push) Successful in 0s
Add deployment pipeline and add some content
2024-01-10 00:14:01 +01:00

15 lines
No EOL
484 B
Bash
Executable file

#!/usr/bin/env bash
script="$(realpath "${BASH_SOURCE[-1]}")"
path="$(dirname "$script")"
cd $path
wget -O spaceapi-schema.json https://raw.githubusercontent.com/SpaceApi/schema/master/14.json
go install github.com/a-h/generate/cmd/schema-generate@latest
mkdir -p pkg/spaceapi
/go/bin/schema-generate -o pkg/spaceapi/spaceapi.go -p spaceapi spaceapi-schema.json
rm spaceapi-schema.json
# TODO: Do it inline
# https://github.com/a-h/generate/blob/master/cmd/schema-generate/main.go