Skip to content

Commit 91723e0

Browse files
authored
Add install target (#104)
1 parent 71c8d64 commit 91723e0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.PHONY: dev
44
dev: ## dev build
5-
dev: clean generate build fmt lint test mod-tidy build-snapshot
5+
dev: clean install generate build fmt lint test mod-tidy build-snapshot
66

77
.PHONY: ci
88
ci: ## CI build
@@ -14,6 +14,11 @@ clean: ## remove files created during build
1414
rm -rf dist
1515
rm -f coverage.*
1616

17+
.PHONY: install
18+
install: ## go install tools
19+
$(call print-target)
20+
cd tools && go install -v $(shell cd tools && go list -f '{{ join .Imports " " }}' -tags=tools)
21+
1722
.PHONY: generate
1823
generate: ## go generate
1924
$(call print-target)
@@ -32,7 +37,6 @@ fmt: ## go fmt
3237
.PHONY: lint
3338
lint: ## golangci-lint
3439
$(call print-target)
35-
cd tools && go install github.com/golangci/golangci-lint/cmd/golangci-lint
3640
golangci-lint run
3741

3842
.PHONY: test
@@ -50,7 +54,6 @@ mod-tidy: ## go mod tidy
5054
.PHONY: build-snapshot
5155
build-snapshot: ## goreleaser --snapshot --skip-publish --rm-dist
5256
$(call print-target)
53-
cd tools && go install github.com/goreleaser/goreleaser
5457
goreleaser --snapshot --skip-publish --rm-dist
5558

5659
.PHONY: diff
@@ -61,8 +64,8 @@ diff: ## git diff
6164

6265
.PHONY: release
6366
release: ## goreleaser --rm-dist
67+
release: install
6468
$(call print-target)
65-
cd tools && go install github.com/goreleaser/goreleaser
6669
goreleaser --rm-dist
6770

6871
.PHONY: run

0 commit comments

Comments
 (0)