[ci] Add local build target
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
4f48a886d3
commit
47e40595f5
1 changed files with 9 additions and 2 deletions
11
Makefile
11
Makefile
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue