Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Commit 48ba7a9

Browse files
Modernize our Makefile
Brings the Makefile in line with our conventions on other projects. Signed-off-by: Christopher Maier <[email protected]>
1 parent d8c5c14 commit 48ba7a9

File tree

1 file changed

+26
-11
lines changed

1 file changed

+26
-11
lines changed

Makefile

Lines changed: 26 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,53 @@
11
DOCKER_COMPOSE_CHECK := docker compose run --rm
22

3-
# Linting
3+
.PHONY: all
4+
all: format
5+
all: lint
6+
all: test
7+
all: ## Run all operations
8+
9+
.PHONY: help
10+
help: ## Print this help
11+
@awk 'BEGIN {FS = ":.*##"; printf "Usage: make <target>\n"} \
12+
/^[a-zA-Z0-9_-]+:.*?##/ { printf " %-46s %s\n", $$1, $$2 } \
13+
/^##@/ { printf "\n%s\n", substr($$0, 5) } ' \
14+
$(MAKEFILE_LIST)
15+
@printf '\n'
16+
17+
##@ Linting
418
########################################################################
519

620
.PHONY: lint
7-
lint: lint-plugin lint-shell
21+
lint: lint-plugin
22+
lint: lint-shell
23+
lint: ## Perform lint checks on all files
824

925
.PHONY: lint-plugin
10-
lint-plugin:
26+
lint-plugin: ## Lint the Buildkite plugin metadata
1127
$(DOCKER_COMPOSE_CHECK) plugin-linter
1228

1329
.PHONY: lint-shell
14-
lint-shell:
30+
lint-shell: ## Lint the shell scripts
1531
./pants lint ::
1632

17-
# Formatting
33+
##@ Formatting
1834
########################################################################
1935

2036
.PHONY: format
2137
format: format-shell
38+
format: ## Automatically format all code
2239

2340
.PHONY: format-shell
24-
format-shell:
41+
format-shell: ## Format shell scripts
2542
./pants fmt ::
2643

27-
# Testing
44+
##@ Testing
2845
########################################################################
2946

3047
.PHONY: test
3148
test: test-plugin
49+
test: ## Run all tests
3250

3351
.PHONY: test-plugin
34-
test-plugin:
52+
test-plugin: ## Test the Buildkite plugin locally (does *not* run a Buildkite pipeline)
3553
$(DOCKER_COMPOSE_CHECK) plugin-tester
36-
37-
.PHONY: all
38-
all: format lint test

0 commit comments

Comments
 (0)