SEBRAUC/Makefile
Theta-Dev b1b3ab3ff6
All checks were successful
continuous-integration/drone/push Build is passing
add dynamic versioning
2021-11-21 23:29:37 +01:00

19 lines
415 B
Makefile

SRC_DIR=./src
UI_DIR=./ui
VERSION=$(shell git tag --sort=-version:refname | head -n 1)
setup:
go get -t ./src/...
cd ${UI_DIR} && pnpm install
test:
go test -v ./src/...
build-ui:
cd ${UI_DIR} && VITE_VERSION=${VERSION} pnpm run build
build-server:
go build -tags prod -ldflags "-s -w -X code.thetadev.de/TSGRain/SEBRAUC/src/util.version=${VERSION}" -o build/sebrauc ./src/.
build: build-ui build-server