Use existing goimports installation if available
This commit is contained in:
parent
b45820714d
commit
75aabac594
@ -1,6 +1,9 @@
|
|||||||
|
GOIMPORTS_BIN ?= $(shell which goimports || true)
|
||||||
GOTEST_FLAGS ?= -v --coverprofile main.coverprofile --covermode count --cover github.com/urfave/cli/v2/cmd/urfave-cli-genflags
|
GOTEST_FLAGS ?= -v --coverprofile main.coverprofile --covermode count --cover github.com/urfave/cli/v2/cmd/urfave-cli-genflags
|
||||||
GOBUILD_FLAGS ?= -x
|
GOBUILD_FLAGS ?= -x
|
||||||
|
|
||||||
|
export GOIMPORTS_BIN
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: test build smoke-test
|
all: test build smoke-test
|
||||||
|
|
||||||
|
@ -94,8 +94,9 @@ func main() {
|
|||||||
Value: "cli.",
|
Value: "cli.",
|
||||||
},
|
},
|
||||||
&cli.PathFlag{
|
&cli.PathFlag{
|
||||||
Name: "goimports",
|
Name: "goimports",
|
||||||
Value: filepath.Join(top, ".local/bin/goimports"),
|
EnvVars: []string{"GOIMPORTS_BIN"},
|
||||||
|
Value: filepath.Join(top, ".local/bin/goimports"),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Action: runGenFlags,
|
Action: runGenFlags,
|
||||||
|
Loading…
Reference in New Issue
Block a user