Skip to content

Commit

Permalink
[ci] Add local build target
Browse files Browse the repository at this point in the history
Signed-off-by: Knut Ahlers <[email protected]>
  • Loading branch information
Luzifer committed Aug 15, 2023
1 parent 4f48a88 commit 47e4059
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 47e4059

Please sign in to comment.