-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (54 loc) · 1.89 KB
/
Copy pathMakefile
File metadata and controls
65 lines (54 loc) · 1.89 KB
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
STATICCHECK_VERSION ?= v0.7.0
GOVULNCHECK_VERSION ?= v1.3.0
CLI_COVER_PROFILE ?= coverage-cli
.PHONY: test vet vuln private-state build install-local coverage-cli actionlint staticcheck release-check
test:
go test ./...
vet:
go vet ./...
vuln:
go run golang.org/x/vuln/cmd/govulncheck@$(GOVULNCHECK_VERSION) ./...
private-state:
bash scripts/check-private-state.sh
build:
go build -o bin/dida ./cmd/dida
install-local: build
mkdir -p "$(HOME)/.local/bin"
cp bin/dida "$(HOME)/.local/bin/dida"
coverage-cli:
go test ./internal/cli -coverprofile=$(CLI_COVER_PROFILE)
go tool cover -func=$(CLI_COVER_PROFILE)
actionlint:
go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12
staticcheck:
go run honnef.co/go/tools/cmd/staticcheck@$(STATICCHECK_VERSION) ./...
release-check:
ifndef VERSION
$(error usage: make release-check VERSION=vX.Y.Z)
endif
bash scripts/validate-release-metadata.sh --tag "$(VERSION)" --skip-git-checks
bash scripts/validate-release-metadata.test.sh
bash scripts/validate-changelog.sh --tag "$(VERSION)"
bash scripts/validate-changelog.test.sh
$(MAKE) test
$(MAKE) vet
$(MAKE) vuln
$(MAKE) private-state
bash scripts/validate-website.sh
bash scripts/validate-website.test.sh
bash scripts/generate-release-notes.test.sh
bash scripts/validate-npm-package.sh --version "$(VERSION)"
bash scripts/validate-npm-package.test.sh
bash scripts/validate-repo-governance.sh
bash scripts/validate-repo-governance.test.sh
bash scripts/validate-actions-pinned.sh
bash scripts/validate-actions-pinned.test.sh
bash scripts/update-packaging-templates.test.sh
bash scripts/export-package-manager-repos.test.sh
bash scripts/package-manager-smoke-preflight.test.sh
bash scripts/winget-submission-preflight.test.sh
bash scripts/validate-packaging.sh --metadata-only
bash scripts/validate-packaging.test.sh
bash scripts/verify-release-archives.test.sh
$(MAKE) staticcheck
$(MAKE) actionlint