Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Make targets #224

Merged
merged 1 commit into from
Nov 5, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
SHELL := /bin/bash

.DEFAULT_GOAL := dev
.PHONY: dev
dev: ## dev build
dev: mod-tidy install misspell generate lint test build
.DEFAULT_GOAL := all
.PHONY: all
all: ## build pipeline
all: mod inst gen build spell lint test

.PHONY: ci
ci: ## CI build
ci: dev diff
ci: ## CI build pipeline
ci: all diff

.PHONY: help
help:
Expand All @@ -21,26 +21,32 @@ clean: ## remove files created during build pipeline
rm -f '"$(shell go env GOCACHE)/../golangci-lint"'
go clean -i -cache -testcache -modcache -fuzzcache -x

.PHONY: mod-tidy
mod-tidy: ## go mod tidy
.PHONY: mod
mod: ## go mod tidy
$(call print-target)
go mod tidy
cd tools && go mod tidy

.PHONY: install
install: ## go install tools
.PHONY: inst
inst: ## go install tools
$(call print-target)
cd tools && go install $(shell cd tools && go list -f '{{ join .Imports " " }}' -tags=tools)

.PHONY: misspell
misspell: ## misspell
.PHONY: gen
gen: ## go generate
$(call print-target)
misspell -error -locale=US -w **.md
go generate ./...

.PHONY: generate
generate: ## go generate
.PHONY: build
build: ## goreleaser build
build:
$(call print-target)
go generate ./...
goreleaser build --rm-dist --single-target --snapshot

.PHONY: spell
spell: ## misspell
$(call print-target)
misspell -error -locale=US -w **.md

.PHONY: lint
lint: ## golangci-lint
Expand All @@ -53,12 +59,6 @@ test: ## go test
go test -race -covermode=atomic -coverprofile=coverage.out -coverpkg=./... ./...
go tool cover -html=coverage.out -o coverage.html

.PHONY: build
build: ## goreleaser build
build:
$(call print-target)
goreleaser build --rm-dist --single-target --snapshot

.PHONY: diff
diff: ## git diff
$(call print-target)
Expand Down