diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 26 |
1 files changed, 23 insertions, 3 deletions
@@ -6,6 +6,19 @@ GO_TEST=go test -v -timeout 100ms -shuffle on -parallel `nproc` GO_BUILD=go build -v -ldflags '-w -s' GO_RUN=go run -v +# Development setup +DB_TYPE?=sqlite +DB_CON?=main.db +LOG_LEVEL?=error +SCHEDULER_COUNT?=`nproc` +CACHE_PATH?=$(HOME)/cache +AES_KEY?=`openssl rand -rand /dev/urandom 32 | base64` + +ifneq (,$(wildcard ./.env)) + include .env + export +endif + all: build build: sass tmpl @@ -19,9 +32,12 @@ compress_into_oblivion: build run: sass $(GO_RUN) $(SERVER) \ - --log-level error \ - --aes-key=6368616e676520746869732070617373 \ - --cache-path=${HOME}/.thumb + --db-type=$(DB_TYPE) \ + --db-con="$(DB_CON)" \ + --log-level=$(LOG_LEVEL) \ + --scheduler-count=$(SCHEDULER_COUNT) \ + --cache-path="$(CACHE_PATH)" \ + --aes-key="$(AES_KEY)" sass: @mkdir -p static @@ -75,3 +91,7 @@ gci: alignment: betteralign -apply ./... + +watch: + find . \( ! -name "*.qtpl.go" -a \( -name "*.go" -o -name "*.qtpl" -o -name "main.scss" \) \) | \ + entr -sr 'make run' |