From 1b745ff36c069693c04a1ee6de3d9e2c14d9d872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Paj=C4=85k?= Date: Sat, 5 Nov 2022 10:30:19 +0100 Subject: [PATCH] Update Makefile --- Makefile | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 7d720fd..aed3c97 100644 --- a/Makefile +++ b/Makefile @@ -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: @@ -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 @@ -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)