Commit Graph

2 Commits

Author SHA1 Message Date
Sebastiaan van Stijn
a3a2d14ecc
fix verify-vendor if go.mod does not contain replace rules
Before this patch, if the go.mod did not contain a replace rule, jq would fail
(Cannot iterate over null), and Bash would produce an error when trying to add
an empty `$key` to `map_requires`:

    make verify-vendor
    + verify-vendor
      jq: error (at <stdin>:581): Cannot iterate over null (null)
      /go/src/github.com/containerd/containerd//script/verify-go-modules.sh: line 44: map_replaces_1[$key]: bad array subscript
      make: *** [Makefile:435: verify-vendor] Error 1

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2022-05-27 12:57:12 +02:00
Davanum Srinivas
43117cf919
Script to check if entries in go.mod files are in sync
- ensure that the root go.mod and the module specific go.mod have the
  same `require` and `replace` directives for different dependencies.

Signed-off-by: Davanum Srinivas <davanum@gmail.com>
2021-07-27 17:52:32 -04:00