From 102f6170471322f6422ff0f4075aa50f3ceca7fa Mon Sep 17 00:00:00 2001 From: Qing Hao Date: Fri, 20 Sep 2024 10:59:26 +0800 Subject: [PATCH] remove unused dependencies (#171) Signed-off-by: haoqing0110 --- build/install-dependencies.sh | 11 ++--------- build/run-functional-tests.sh | 10 ++-------- go.mod | 1 + go.sum | 2 ++ vendor/modules.txt | 2 ++ 5 files changed, 9 insertions(+), 17 deletions(-) diff --git a/build/install-dependencies.sh b/build/install-dependencies.sh index 33f9e3ea..258d6d78 100755 --- a/build/install-dependencies.sh +++ b/build/install-dependencies.sh @@ -3,20 +3,13 @@ # Copyright (c) 2020 Red Hat, Inc. # Copyright Contributors to the Open Cluster Management project -export GO111MODULE=off - # Go tools _OS=$(go env GOOS) _ARCH=$(go env GOARCH) KubeBuilderVersion="2.3.0" -if ! which patter > /dev/null; then echo "Installing patter ..."; go get -u github.com/apg/patter; fi -if ! which gocovmerge > /dev/null; then echo "Installing gocovmerge..."; go get -u github.com/wadey/gocovmerge; fi -if ! which go-bindata > /dev/null; then - echo "Installing go-bindata..." - cd $(mktemp -d) && GOSUMDB=off go get -u github.com/go-bindata/go-bindata/... -fi -go-bindata --version +if ! which patter > /dev/null; then echo "Installing patter ..."; go install github.com/apg/patter@latest; fi +if ! which gocovmerge > /dev/null; then echo "Installing gocovmerge..."; go install -mod=mod github.com/wadey/gocovmerge; fi # Build tools if ! which kubebuilder > /dev/null; then diff --git a/build/run-functional-tests.sh b/build/run-functional-tests.sh index 9608c0b7..205a2dd5 100755 --- a/build/run-functional-tests.sh +++ b/build/run-functional-tests.sh @@ -27,17 +27,11 @@ if ! which kind > /dev/null; then fi if ! which ginkgo > /dev/null; then echo "Installing ginkgo ..." - pushd $(mktemp -d) - go install github.com/onsi/ginkgo/v2/ginkgo@v2.3.1 - echo "installing gomega ..." - GO111MODULE=off go get github.com/onsi/gomega/... - popd + go install github.com/onsi/ginkgo/v2/ginkgo@v2.9.1 fi if ! which gocovmerge > /dev/null; then echo "Installing gocovmerge..." - pushd $(mktemp -d) - go install github.com/wadey/gocovmerge@latest - popd + go install -mod=mod github.com/wadey/gocovmerge fi if ! which helm > /dev/null; then echo "Installing helm..." diff --git a/go.mod b/go.mod index d8c0fd95..c4c4d1df 100644 --- a/go.mod +++ b/go.mod @@ -64,6 +64,7 @@ require ( github.com/shopspring/decimal v1.2.0 // indirect github.com/spf13/cast v1.4.1 // indirect github.com/spf13/pflag v1.0.5 // indirect + github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad // indirect go.uber.org/atomic v1.9.0 // indirect go.uber.org/multierr v1.6.0 // indirect go.uber.org/zap v1.19.1 // indirect diff --git a/go.sum b/go.sum index 23f9eb1d..78365d06 100644 --- a/go.sum +++ b/go.sum @@ -578,6 +578,8 @@ github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o github.com/subosito/gotenv v1.2.0/go.mod h1:N0PQaV/YGNqwC0u51sEeR/aUtSLEXKX9iv69rRypqCw= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20201229170055-e5319fda7802/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= +github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad h1:W0LEBv82YCGEtcmPA3uNZBI33/qF//HAAs3MawDjRa0= +github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad/go.mod h1:Hy8o65+MXnS6EwGElrSRjUzQDLXreJlzYLlWiHtt8hM= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= diff --git a/vendor/modules.txt b/vendor/modules.txt index 9c946765..f45fc538 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -214,6 +214,8 @@ github.com/stolostron/library-go/pkg/apis/meta/v1/deployment github.com/stolostron/library-go/pkg/client github.com/stolostron/library-go/pkg/config github.com/stolostron/library-go/pkg/templateprocessor +# github.com/wadey/gocovmerge v0.0.0-20160331181800-b5bfa59ec0ad +## explicit # go.uber.org/atomic v1.9.0 ## explicit; go 1.13 go.uber.org/atomic