[ci] Add local build target

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2023-08-15 13:38:24 +02:00
parent 4f48a886d3
commit 47e40595f5
No known key found for this signature in database
GPG Key ID: D91C3E91E4CAD6F5

View File

@ -3,16 +3,23 @@ VER_FONTAWESOME:=6.4.0
default: generate download_libs default: generate download_libs
build-local: download_libs generate-inner generate-apidocs
go build \
-buildmode=pie \
-ldflags "-s -w -X main.version=$(git describe --tags --always || echo dev)" \
-mod=readonly \
-trimpath
generate: generate:
docker run --rm -i -v $(CURDIR):$(CURDIR) -w $(CURDIR) node:18-alpine \ docker run --rm -i -v $(CURDIR):$(CURDIR) -w $(CURDIR) node:18-alpine \
sh -exc "apk add make && make generate-inner generate-apidocs && chown -R $(shell id -u) frontend node_modules" sh -exc "apk add make && make generate-inner generate-apidocs && chown -R $(shell id -u) frontend node_modules"
generate-apidocs: generate-apidocs:
npx @redocly/cli build-docs docs/openapi.yaml --disableGoogleFont true -o /tmp/api.html npx --yes @redocly/cli build-docs docs/openapi.yaml --disableGoogleFont true -o /tmp/api.html
mv /tmp/api.html frontend/ mv /tmp/api.html frontend/
generate-inner: generate-inner:
npx npm@latest ci npx --yes npm@latest ci
node ./ci/build.mjs node ./ci/build.mjs
publish: download_libs generate-inner generate-apidocs publish: download_libs generate-inner generate-apidocs