Skip to content
Myr

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 file

Take it

leverage makefile to run build tasks (#976)Joshua Harshmanbefore adoption39cf99f

lines 1–3why, one step back
1BIN="./bin"
2SRC=$(shell find . -name "*.go")3

Use golangci-lint (#1044)Unai Martinez-Corralbefore adoption652c755

lines 4–7why, one step back
4ifeq (, $(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")6endif7

leverage makefile to run build tasks (#976)Joshua Harshmanbefore adoption39cf99f

lines 8–11why, one step back
8ifeq (, $(shell which richgo))
9$(warning "could not find richgo in $(PATH), run: go get github.com/kyoh86/richgo")10endif11

Removes viper dependency by removing cobra/ CLI tool (#1604)John McBridebefore adoption5b2b9e9

line 12why, one step back
12.PHONY: fmt lint test install_deps clean

leverage makefile to run build tasks (#976)Joshua Harshmanbefore adoption39cf99f

lines 13–15why, one step back
13
14default: all15

Removes viper dependency by removing cobra/ CLI tool (#1604)John McBridebefore adoption5b2b9e9

line 16why, one step back
16all: fmt test

leverage makefile to run build tasks (#976)Joshua Harshmanbefore adoption39cf99f

lines 17–21why, one step back
17
18fmt:19 $(info ******************** checking formatting ********************)20 @test -z $(shell gofmt -l $(SRC)) || (gofmt -d $(SRC); exit 1)21

Use golangci-lint (#1044)Unai Martinez-Corralbefore adoption652c755

lines 22–25why, one step back
22lint:
23 $(info ******************** running lint tools ********************)24 golangci-lint run -v25

chore(ci): use golangci-lint-action (#1477)Matthieu MORELbefore adoptionff2c55e

line 26why, one step back
26test: install_deps

leverage makefile to run build tasks (#976)Joshua Harshmanbefore adoption39cf99f

lines 27–35why, one step back
27 $(info ******************** running tests ********************)
28 richgo test -v ./...2930install_deps:31 $(info ******************** downloading dependencies ********************)32 go get -v ./...3334clean:35 rm -rf $(BIN)