mirror of
https://github.com/Luzifer/ots.git
synced 2024-10-01 01:06:09 -04:00
[ci] Add local build target
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
4f48a886d3
commit
47e40595f5
11
Makefile
11
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
|
||||
|
Loading…
Reference in New Issue
Block a user