accounting/Makefile

35 lines
603 B
Makefile
Raw Normal View History

2024-01-16 15:13:04 +00:00
PORT := 5000
default: build
build: export CGO_ENABLED=0
2024-01-16 15:13:04 +00:00
build: frontend
go build \
-ldflags "-s -w -X main.version=$(shell git describe --tags --always || echo dev)" \
2024-01-16 15:13:04 +00:00
-mod=readonly \
-trimpath
.PHONY: frontend
frontend: node_modules
2024-01-17 22:36:40 +00:00
git clean -fdx pkg/frontend/assets/
2024-01-16 15:13:04 +00:00
node ci/build.mjs
node_modules:
npm ci --include=dev
2024-01-16 15:13:04 +00:00
publish: frontend
bash ci/build.sh
2024-01-16 15:13:04 +00:00
run: frontend
go run . --listen=:$(PORT)
trivy:
trivy fs . \
--dependency-tree \
--exit-code 1 \
--format table \
--ignore-unfixed \
--quiet \
--scanners license,misconfig,secret,vuln \
--severity HIGH,CRITICAL