Add correct dependency on job.db in Makefile

This commit is contained in:
Jan Eitzinger 2023-02-25 08:17:58 +01:00
parent 1e3e2ab222
commit 252ec3909a

View File

@ -1,5 +1,6 @@
TARGET = ./cc-backend
VAR = ./var
DB = ./var/job.db
FRONTEND = ./web/frontend
VERSION = 0.1
GIT_HASH := $(shell git rev-parse --short HEAD || echo 'development')
@ -27,10 +28,9 @@ SVELTE_SRC = $(wildcard $(FRONTEND)/src/*.svelte) \
.NOTPARALLEL:
$(TARGET): $(VAR) $(SVELTE_TARGETS)
$(TARGET): $(VAR) $(DB) $(SVELTE_TARGETS)
$(info ===> BUILD cc-backend)
@go build -ldflags=${LD_FLAGS} ./cmd/cc-backend
./cc-backend --migrate-db
clean:
$(info ===> CLEAN)
@ -43,10 +43,13 @@ test:
@go vet ./...
@go test ./...
$(SVELTE_TARGETS): $(SVELTE_SRC)
$(info ===> BUILD frontend)
cd web/frontend && yarn build
$(VAR):
@mkdir $(VAR)
cd web/frontend && yarn install
$(DB):
./cc-backend --migrate-db
$(SVELTE_TARGETS): $(SVELTE_SRC)
$(info ===> BUILD frontend)
cd web/frontend && yarn build