From 47e40595f5a26042651bedf9383adc1f771a525b Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Tue, 15 Aug 2023 13:38:24 +0200 Subject: [PATCH] [ci] Add local build target Signed-off-by: Knut Ahlers --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index c589dc9..4c4adc1 100644 --- a/Makefile +++ b/Makefile @@ -3,16 +3,23 @@ VER_FONTAWESOME:=6.4.0 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: 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" 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/ generate-inner: - npx npm@latest ci + npx --yes npm@latest ci node ./ci/build.mjs publish: download_libs generate-inner generate-apidocs