This commit is contained in:
parent
59b3316c35
commit
3cb3bca3d9
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,10 @@
|
|||
FROM golang:alpine AS build
|
||||
COPY . /app
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache bash wget
|
||||
RUN ./generate-spaceapi-types.sh
|
||||
|
||||
RUN GOOS=linux go build -o oko-spaceapi cmd/server.go
|
||||
|
||||
FROM alpine
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
script="$(realpath "${BASH_SOURCE[-1]}")"
|
||||
path="$(dirname "$script")"
|
||||
|
||||
|
@ -11,7 +8,7 @@ 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
|
||||
/go/bin/schema-generate -o pkg/spaceapi/spaceapi.go -p spaceapi spaceapi-schema.json
|
||||
rm spaceapi-schema.json
|
||||
|
||||
# TODO: Do it inline
|
||||
|
|
Loading…
Reference in a new issue