mirror of
https://github.com/Luzifer/ots.git
synced 2024-10-01 01:06:09 -04:00
ba4b1badb4
Signed-off-by: Knut Ahlers <knut@ahlers.me>
39 lines
1.2 KiB
Makefile
39 lines
1.2 KiB
Makefile
VER_FONTAWESOME=5.14.0
|
|
|
|
|
|
default: generate download_libs
|
|
|
|
generate:
|
|
docker run --rm -i -v $(CURDIR):$(CURDIR) -w $(CURDIR) node:14-alpine \
|
|
sh -exc "apk add make && make -C src -f ../Makefile generate-inner && chown -R $(shell id -u) frontend src/node_modules"
|
|
docker run --rm -ti -v $(CURDIR):$(CURDIR) -w $(CURDIR) node:14-alpine \
|
|
sh -exc "apk add make && make generate-apidocs && chown -R $(shell id -u) frontend"
|
|
|
|
generate-apidocs:
|
|
npx redoc-cli bundle docs/openapi.yaml --disableGoogleFont true -o frontend/api.html
|
|
|
|
generate-inner:
|
|
npx npm@latest ci
|
|
npx npm@latest run build
|
|
|
|
publish: download_libs generate-apidocs
|
|
$(MAKE) -C src -f ../Makefile generate-inner
|
|
curl -sSLo golang.sh https://raw.githubusercontent.com/Luzifer/github-publish/master/golang.sh
|
|
bash golang.sh
|
|
|
|
# -- Download / refresh external libraries --
|
|
|
|
clean_libs:
|
|
rm -rf \
|
|
frontend/css \
|
|
frontend/js \
|
|
frontend/openssl \
|
|
frontend/webfonts
|
|
|
|
download_libs: clean_libs
|
|
download_libs: fontawesome
|
|
|
|
fontawesome:
|
|
curl -sSfL https://github.com/FortAwesome/Font-Awesome/archive/$(VER_FONTAWESOME).tar.gz | \
|
|
tar -vC frontend -xz --strip-components=1 --wildcards --exclude='*/js-packages' '*/css' '*/webfonts'
|