Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit 4d629d5

Browse files
committed
Merge pull request #191 from vdemeester/kewl-makefile
Add a make help target
2 parents 46ee1da + ce82284 commit 4d629d5

File tree

1 file changed

+11
-24
lines changed

1 file changed

+11
-24
lines changed

Makefile

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -19,46 +19,31 @@ DOCKER_RUN_LIBCOMPOSE := docker run --rm -it --privileged $(LIBCOMPOSE_ENVS) $(L
1919

2020
default: binary
2121

22-
all: build
22+
all: build ## validate all checks, build linux binary, run all tests\ncross build non-linux binaries
2323
$(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh
2424

25-
binary: build
25+
binary: build ## build the linux binary
2626
$(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh binary
2727

28-
cross-binary: build
28+
cross-binary: build ## cross build the non linux binaries (windows, darwin)
2929
$(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh cross-binary
3030

31-
test: build
31+
test: build ## run the unit, integration and acceptance tests
3232
$(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh binary test-unit test-integration test-acceptance
3333

34-
test-unit: build
34+
test-unit: build ## run the unit tests
3535
$(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh test-unit
3636

37-
test-integration: build
37+
test-integration: build ## run the integration tests
3838
$(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh binary test-integration
3939

40-
test-acceptance: build
40+
test-acceptance: build ## run the acceptance tests
4141
$(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh binary test-acceptance
4242

43-
validate-dco: build
44-
$(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh validate-dco
45-
46-
validate-gofmt: build
47-
$(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh validate-gofmt
48-
49-
validate-lint: build
50-
$(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh validate-lint
51-
52-
validate-vet: build
53-
$(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh validate-vet
54-
55-
validate-git-marks: build
56-
$(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh validate-git-marks
57-
58-
validate: build
43+
validate: build ## validate DCO, git conflicts marks, gofmt, golint and go vet
5944
$(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh validate-dco validate-git-marks validate-gofmt validate-lint validate-vet
6045

61-
shell: build
46+
shell: build ## start a shell inside the build env
6247
$(DOCKER_RUN_LIBCOMPOSE) bash
6348

6449
# Build the docker image, should be prior almost any other goals
@@ -71,3 +56,5 @@ bundles:
7156
clean:
7257
$(DOCKER_RUN_LIBCOMPOSE) ./script/make.sh clean
7358

59+
help: ## this help
60+
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {sub("\\\\n",sprintf("\n%22c"," "), $$2);printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)

0 commit comments

Comments
 (0)