21 lines
394 B
Makefile
21 lines
394 B
Makefile
LISTEN ?= :8080
|
|
AUDIT_PATH ?=
|
|
VERSION ?= $(shell sh ./scripts/resolve-version.sh)
|
|
GO_LDFLAGS := -X main.Version=$(VERSION)
|
|
|
|
RUN_ARGS := web --listen $(LISTEN)
|
|
ifneq ($(AUDIT_PATH),)
|
|
RUN_ARGS += --audit-path $(AUDIT_PATH)
|
|
endif
|
|
|
|
.PHONY: run build test
|
|
|
|
run:
|
|
go run -ldflags "$(GO_LDFLAGS)" ./cmd/bee $(RUN_ARGS)
|
|
|
|
build:
|
|
go build -ldflags "$(GO_LDFLAGS)" -o bee ./cmd/bee
|
|
|
|
test:
|
|
go test ./...
|