-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (25 loc) · 803 Bytes
/
Makefile
File metadata and controls
32 lines (25 loc) · 803 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.PHONY: default run fmt help
default: help
run: ## Run the program
go run server.go
image: Dockerfile ## Build container image
@docker buildx build . -t ghcr.io/aeolyus/gull
release: Dockerfile ## Build and push the container image for all platforms
-@docker buildx rm gull-builder
@docker buildx create --name gull-builder --bootstrap --use
@docker buildx build . \
-t aeolyus/gull \
-t ghcr.io/aeolyus/gull \
--platform linux/arm,linux/arm64,linux/amd64 \
--push
@docker buildx stop
-@docker buildx rm gull-builder
fmt: ## Format the code
go fmt ./...
test: ## Run tests
go test -cover ./...
help: Makefile ## Print this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) \
| sort \
| awk 'BEGIN {FS = ":.*?## "}; \
{printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'