Skip to content

Commit 4cf1161

Browse files
committed
Add makefile help
1 parent 34b5ec0 commit 4cf1161

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

Makefile

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1-
build:
1+
.PHONY: help
2+
help: ## show this help
3+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
4+
| awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%s\033[0m|%s\n", $$1, $$2}' \
5+
| column -t -s '|'
6+
7+
8+
build: ## Build devcontainer cli
29
go build ./cmd/devcontainer
310

4-
lint: build
11+
lint: build ## Build and lint
512
golangci-lint run
613

7-
devcontainer:
14+
devcontainer: ## (Advanced) Build the devcontainer
815
docker build -f ./.devcontainer/Dockerfile ./.devcontainer -t devcontainer-cli
916

10-
devcontainer-release:
17+
devcontainer-release: ## (Advanced) Run the devcontainer for release
1118
ifdef DEVCONTAINER
1219
$(error This target can only be run outside of the devcontainer as it mounts files and this fails within a devcontainer. Don't worry all it needs is docker)
1320
endif

0 commit comments

Comments
 (0)