Skip to content

Commit cd6fec8

Browse files
committed
Cleaning up Makefile.
1 parent 4415e84 commit cd6fec8

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

Makefile

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,31 +11,36 @@ GOPATH ?= ${GOPATH}
1111
E2E_DIR ?= test/e2e
1212
GO_FLAGS ?= -v -a -ldflags=-s -mod=vendor
1313

14-
.PHONY: vendor build clean test
14+
ARGS ?=
1515

1616
default: build
1717

18+
.PHONY: vendor
1819
vendor:
1920
go mod vendor
2021

2122
$(BIN):
22-
go build $(GO_FLAGS) -o $(BIN) cmd/$(APP)/*
23+
go build $(GO_FLAGS) -o $(BIN) $(CMD)
2324
build: $(BIN)
2425

26+
.PHONY: run
27+
run:
28+
go run $(GO_FLAGS) $(CMD) $(ARGS)
29+
2530
install: build
2631
install -m 0755 $(BIN) $(GOPATH)/bin/
2732

33+
.PHONY: clean
2834
clean:
2935
rm -rf $(OUTPUT_DIR) > /dev/null
3036

31-
clean-vendor:
32-
rm -rf ./vendor > /dev/null
33-
3437
test: test-unit test-e2e
3538

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

43+
.PHONY: test-e2e
3944
test-e2e:
4045
bats --recursive $(E2E_DIR)
4146

0 commit comments

Comments
 (0)