Makefile
This file
Path
Makefile
35 lines · 903 bytes
Last changed by
Removes viper dependency by removing cobra/ CLI tool (#1604)John McBridebefore adoption5b2b9e9
History of this fileTake it
leverage makefile to run build tasks (#976)Joshua Harshmanbefore adoption39cf99f
lines 1–3why, one step back1BIN="./bin"2SRC=$(shell find . -name "*.go")3Use golangci-lint (#1044)Unai Martinez-Corralbefore adoption652c755
lines 4–7why, one step back4ifeq (, $(shell which golangci-lint))5$(warning "could not find golangci-lint in $(PATH), run: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh")6endif7leverage makefile to run build tasks (#976)Joshua Harshmanbefore adoption39cf99f
lines 8–11why, one step back8ifeq (, $(shell which richgo))9$(warning "could not find richgo in $(PATH), run: go get github.com/kyoh86/richgo")10endif11Removes viper dependency by removing cobra/ CLI tool (#1604)John McBridebefore adoption5b2b9e9
line 12why, one step back12.PHONY: fmt lint test install_deps cleanleverage makefile to run build tasks (#976)Joshua Harshmanbefore adoption39cf99f
lines 13–15why, one step back1314default: all15Removes viper dependency by removing cobra/ CLI tool (#1604)John McBridebefore adoption5b2b9e9
line 16why, one step back16all: fmt testleverage makefile to run build tasks (#976)Joshua Harshmanbefore adoption39cf99f
lines 17–21why, one step back1718fmt:19 $(info ******************** checking formatting ********************)20 @test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1)21Use golangci-lint (#1044)Unai Martinez-Corralbefore adoption652c755
lines 22–25why, one step back22lint:23 $(info ******************** running lint tools ********************)24 golangci-lint run -v25chore(ci): use golangci-lint-action (#1477)Matthieu MORELbefore adoptionff2c55e
line 26why, one step back26test: install_depsleverage makefile to run build tasks (#976)Joshua Harshmanbefore adoption39cf99f
lines 27–35why, one step back27 $(info ******************** running tests ********************)28 richgo test -v ./...2930install_deps:31 $(info ******************** downloading dependencies ********************)32 go get -v ./...3334clean:35 rm -rf $(BIN)