Skip to content

Commit

Permalink
Update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
pellared authored Nov 5, 2022
1 parent 025c751 commit 1b745ff
Showing 1 changed file with 22 additions and 22 deletions.
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

0 comments on commit 1b745ff

Please sign in to comment.