Skip to content

Commit

Permalink
fix: makefile (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fazt01 committed Jul 16, 2024
1 parent 08bb6a8 commit 5323dc9
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,31 @@ GO := $(shell which go)

APP_VERSION ?= "v0.0.0"

.PHONY:
run \
test \
build

.PHONY: all
all: fmt vet build

.PHONY: fmt
fmt:
$(GO) fmt ./...

.PHONY: vet
vet:
$(GO) vet ./...

.PHONY: run
run: RUN_ARGS=--help
run: fmt vet
$(GO) run ./cmd/tea $(RUN_ARGS)

.PHONY: test
test: generate
$(GO) test ./... -cover

.PHONY: build
build: BUILD_OUTPUT=./bin/tea
build: generate
CGO_ENABLED=0 $(GO) build -ldflags "-X main.version=$(APP_VERSION)" -mod=readonly -o $(BUILD_OUTPUT) ./cmd/tea

.PHONY: generate
generate:
$(GO) generate ./...

0 comments on commit 5323dc9

Please sign in to comment.