From 0235f1d6c59e0bfbe23d7211e48beacd0bb175a6 Mon Sep 17 00:00:00 2001 From: Kazuyoshi Kato Date: Tue, 3 Sep 2019 10:21:57 -0700 Subject: [PATCH] Use "go mod" instead of vndr when GO111MODULE is "on" As Derek suggested at https://github.com/containerd/containerd/pull/3182, this change adds Go modules support for the script first. Signed-off-by: Kazuyoshi Kato --- script/validate/vendor | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/script/validate/vendor b/script/validate/vendor index e328462..1c6adac 100755 --- a/script/validate/vendor +++ b/script/validate/vendor @@ -18,7 +18,14 @@ set -eu -o pipefail rm -rf vendor/ -vndr |& grep -v -i clone + +if [ "${GO111MODULE:-}" == 'on' ]; then + go mod init + go mod tidy + go mod vendor +else + vndr |& grep -v -i clone +fi DIFF_PATH="vendor/" DIFF=$(git status --porcelain -- "$DIFF_PATH")