BIN=img OUT=./bin/$(BIN) SERVER=./cmd/server/main.go GO_TEST=go test -v -timeout 100ms -shuffle on -parallel `nproc` GO_BUILD=go build -v -ldflags '-w -s' GO_RUN=go run -v all: build build: sass $(GO_BUILD) -o $(OUT) $(SERVER) compress: build upx -1 $(OUT) compress_into_oblivion: build upx --best --ultra-brute $(OUT) run: sass $(GO_RUN) $(SERVER) \ --log-level error \ --aes-key=6368616e676520746869732070617373 \ --root=${HOME} sass: @mkdir -p static sassc \ -I scss scss/main.scss static/main.css \ --style compressed test: test.unit test.integration test.all: gci test.unit test.integration lint test.integration: $(GO_TEST) -tags=integration ./... test.unit: $(GO_TEST) -tags=unit ./... gen: go run -v \ ./cmd/ggen/... cover.%: $(GO_TEST) \ -tags=$* \ -coverprofile=bin/cover \ ./... go tool cover \ -html=bin/cover \ -o bin/cover.html echo "open bin/cover.html" lint: golangci-lint run \ --fix \ --config golangci.yml \ --verbose \ ./... fix: gci alignment gci: find . \ -type f \ -name "*.go" \ -not -path "./vendor/*" \ -exec gci write -s standard -s default -s "prefix(git.sr.ht/~gabrielgio/img)" {} + alignment: betteralign -apply ./...