Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: makefile #34

Merged
merged 1 commit into from
Jul 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 ./...
Loading