Fix dockerfile
All checks were successful
/ docker-image (push) Successful in 1m0s

This commit is contained in:
Aaron Fischer 2023-10-19 22:56:59 +02:00
parent 59b3316c35
commit 3cb3bca3d9
2 changed files with 4 additions and 4 deletions

View file

@ -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

View file

@ -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