Skip to content

Commit

Permalink
Cleaning up Makefile.
Browse files Browse the repository at this point in the history
  • Loading branch information
otaviof committed Dec 29, 2021
1 parent 4415e84 commit cd6fec8
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,31 +11,36 @@ GOPATH ?= ${GOPATH}
E2E_DIR ?= test/e2e
GO_FLAGS ?= -v -a -ldflags=-s -mod=vendor

.PHONY: vendor build clean test
ARGS ?=

default: build

.PHONY: vendor
vendor:
go mod vendor

$(BIN):
go build $(GO_FLAGS) -o $(BIN) cmd/$(APP)/*
go build $(GO_FLAGS) -o $(BIN) $(CMD)
build: $(BIN)

.PHONY: run
run:
go run $(GO_FLAGS) $(CMD) $(ARGS)

install: build
install -m 0755 $(BIN) $(GOPATH)/bin/

.PHONY: clean
clean:
rm -rf $(OUTPUT_DIR) > /dev/null

clean-vendor:
rm -rf ./vendor > /dev/null

test: test-unit test-e2e

.PHONY: test-unit
test-unit:
go test -failfast -race -coverprofile=coverage.txt -covermode=atomic -cover -v pkg/$(APP)/*

.PHONY: test-e2e
test-e2e:
bats --recursive $(E2E_DIR)

Expand Down

0 comments on commit cd6fec8

Please sign in to comment.