make: Pull all generate dependencies before generating

This commit is contained in:
Radek Simko 2019-01-29 23:07:01 +00:00
parent 6749287aa3
commit 5691c8b337
No known key found for this signature in database
GPG Key ID: 1F1C84FE689A88D7
1 changed files with 4 additions and 6 deletions

View File

@ -72,13 +72,11 @@ cover:
# generate runs `go generate` to build the dynamically generated # generate runs `go generate` to build the dynamically generated
# source files, except the protobuf stubs which are built instead with # source files, except the protobuf stubs which are built instead with
# "make protobuf". # "make protobuf".
generate: generate: tools
@which stringer > /dev/null; if [ $$? -ne 0 ]; then \
GO111MODULE=off go get -u golang.org/x/tools/cmd/stringer; \
fi
# We turn off modules for "go generate" because our downstream generate # We turn off modules for "go generate" because our downstream generate
# commands are not all ready to deal with Go modules yet, and this # commands are not all ready to deal with Go modules yet.
# avoids downloading all of the deps that are in the vendor dir anyway. # See https://github.com/golang/go/issues/24661
# This also avoids downloading all of the deps that are in the vendor dir anyway.
GO111MODULE=off go generate ./... GO111MODULE=off go generate ./...
GO111MODULE=off go fmt command/internal_plugin_list.go > /dev/null GO111MODULE=off go fmt command/internal_plugin_list.go > /dev/null