Sorry, return values were reversed. "true\n" if it needs rebuilding
On Tuesday, 15 September 2020 at 5:00:23 am UTC+8 Alex wrote: > You can run the command: *go list -f {{.Stale}}* > It will print a "true\n" or "false\n" if the package/program in the > current folder needs to be rebuilt. > > On Tuesday, 15 September 2020 at 1:15:32 am UTC+8 fmpw...@gmail.com wrote: > >> >> Hi, >> >> Is there a way to know if a binary has to be rebuilt, due to changes to >> some of its dependencies? >> >> Let's say I have a repo with this structure: >> >> /cmd/tool1/main.go >> /cmd/tool2/main.go >> /pkg/users/update.go >> /pkg/math/avg.go >> >> >> tool1 imports the math package >> tool2 imports both, math and user packages >> >> As part of our CI/CD, I need to know that if a Pull Request only updates >> the user pacakge, only tool2 needs to be deployed to production. >> >> This is of course a simplified example, in real life we'll have a few >> more binaries and a much higher number of packages. >> >> Thanks >> >> Diego >> >> >> >> >> >> -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/f8af4141-cf49-4f5a-a103-fa510ecae738n%40googlegroups.com.