1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-01-05 10:20:53 +02:00
go-micro/cmd
Niek den Breeje 9edc569e68
Add update rule to Makefile (#2315)
I realized that when writing `require go-micro.dev/v4 v4.1.0` in the
`go.mod` file, `go mod tidy` will install that exact version of
`go-micro.dev/v4`. As of right now, v4.1.0 is an outdated version, and
preferably we shouldn't be updating gomu's Go Modules template everytime
a new release is tagged, but still want gomu users to generate projects
using the latest Go Micro version.

In an attempt to solve this problem, I'm opting to add a new Makefile
rule for new projects generated by gomu, `update` that runs `go get -u`.
This aggressively updates any dependencies your Go Modules project may
have.  `go mod tidy` is then able to prune the `go.mod` and `go.sum`
files by removing the unnecessary checksums and transitive dependencies
(e.g. `// indirect`), that were added to by go get -u due to newer
semver available.

Put one and one together and you get two. In addition to adding an
`update` rule to the Makefile generated for new projects by gomu, I'm
also updating the proto and client comments printed when new projects
have been generated to promote the `update` rule.

References:

- https://stackoverflow.com/questions/67201708/go-update-all-modules
2021-10-19 21:12:42 +02:00
..
gomu Add update rule to Makefile (#2315) 2021-10-19 21:12:42 +02:00
protoc-gen-micro fix generation (#2312) 2021-10-15 14:03:40 +01:00
cmd.go go-micro.dev/v4 (#2305) 2021-10-12 12:55:53 +01:00
options.go go-micro.dev/v4 (#2305) 2021-10-12 12:55:53 +01:00