knowyt/server/Makefile
Settel 8f7ec91912
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
feat: install go-bindata
2022-11-04 22:04:08 +01:00

41 lines
888 B
Makefile

info:
@echo available targets:
@perl -ne 'm/^([a-zA-Z0-9\-]+):/ && print(" $$1\n");' Makefile
setup:
cd src/ && go mod tidy
build:
-mkdir -p ../client/.output/public/
$(MAKE) generate
cd src/ && CGO_ENABLED=0 go build -o ../knowyt knowyt.go
run:
$(MAKE) build
./knowyt
run-loop:
pexec -R -c -e TARGET \
-r _run-endless-loop \
-r _run-inotify-restart \
-- $(MAKE) '$$TARGET'
run-standalone:
cd src/ && ../knowyt
_run-endless-loop:
while true; do $(MAKE) run || sleep 3; done
_run-inotify-restart:
inotifyloop --exclude 'data/.*' . curl -s http://localhost:32039/__intern__/exit
clean:
rm -f knowyt
rm -f src/resources/*-generated.go
generate: src/resources/dist-generated.go
src/resources/dist-generated.go: $(shell find ../client/.output/public/ -type f)
src/resources/dist-generated.go: src/resources/dist-build.go
go generate src/resources/dist-build.go