-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
33 lines (28 loc) · 812 Bytes
/
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
init:
@echo "=== 👩🌾 Init Go Project with Pre-commit Hooks ==="
brew install go
brew install node
brew install pre-commit
brew install npm
brew install golangci-lint
brew upgrade golangci-lint
npm install -g @commitlint/cli @commitlint/config-conventional
@echo "=== 🙆 Setup Pre-commit ==="
pre-commit install
@echo "=== ✅ Done. ==="
test:
@echo "=== 🦸️ Prepare Dependency ==="
go mod tidy
@echo "=== 🦸️ Start Unit Test ==="
go test ./... -v
pre-commit.install:
@echo "=== 🙆 Setup Pre-commit ==="
pre-commit install
precommit.rehook:
@echo "=== 🙆 Rehook Pre-commit ==="
pre-commit autoupdate
pre-commit install --install-hooks
pre-commit install --hook-type commit-msg
ci.lint:
@echo "=== 🙆 Start CI Linter ==="
golangci-lint run -v ./... --fix