-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
71 lines (56 loc) · 1.43 KB
/
Makefile
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
SHELL := env VERSION=$(VERSION) $(SHELL)
VERSION ?= $(shell git describe --tags $(git rev-list --tags --max-count=1))
APP_NAME?=go-tools
SHELL := env APP_NAME=$(APP_NAME) $(SHELL)
RELEASE_BRANCH?=master
SHELL := env RELEASE_BRANCH=$(RELEASE_BRANCH) $(SHELL)
GOVERSION:=1.23
TARGET_MAX_CHAR_NUM=20
## Show help
help:
${call colored, help is running...}
@echo ''
@echo 'Usage:'
@echo ' make <target>'
@echo ''
@echo 'Targets:'
@awk '/^[a-zA-Z\-\_0-9]+:/ { \
helpMessage = match(lastLine, /^## (.*)/); \
if (helpMessage) { \
helpCommand = substr($$1, 0, index($$1, ":")-1); \
helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \
printf " %-$(TARGET_MAX_CHAR_NUM)s %s\n", helpCommand, helpMessage; \
} \
} \
{ lastLine = $$0 }' $(MAKEFILE_LIST)
## Build docker images.
build:
docker buildx bake
.PHONY: build
## Sync vendor.
sync-vendor:
./scripts/sync-vendor.sh
.PHONY: sync-vendor
## Install vendored tools.
install-tools: sync-vendor
./scripts/install/vendored-tools.sh
.PHONY: install-tools
check-tools:
./scripts/test/installed-tools.sh
.PHONY: check-tools
## Issue new release.
new-version: install-tools
./scripts/release/new-version.sh
.PHONY: new-release
## Release
release:
./scripts/release/release.sh
.PHONY: release
## Check goreleaser config.
check-releaser:
./scripts/release/check.sh
.PHONY: check-releaser
bump-go-version:
./scripts/bump-go.sh $(GOVERSION)
.PHONY: bump-go-version
.DEFAULT_GOAL := help