Cleanup glide (#1353)

* Cleanup mentions about glide

* Don't use glide to ignore vendor directory

Since go-1.9, "./..." no longer contains the "vendor" directory.
Also, since #1305 migrated dependency management from glide to go mod,
there is no need to think about the "vendor" directory.

See: https://golang.org/doc/go1.9#vendor-dotdotdot

* go mod tidy
This commit is contained in:
namusyaka
2020-11-08 23:21:51 +08:00
committed by GitHub
parent 25036e1b22
commit 8fcbc60969
7 changed files with 12 additions and 169 deletions
+2 -8
View File
@@ -16,7 +16,6 @@
GITCOMMIT := $(shell git rev-parse --short HEAD)
BUILD_FLAGS := -ldflags="-w -s -X github.com/kubernetes/kompose/pkg/version.GITCOMMIT=$(GITCOMMIT)"
PKGS = $(shell glide novendor)
TEST_IMAGE := kompose/tests:latest
default: bin
@@ -48,13 +47,13 @@ clean:
.PHONY: test-unit
test-unit:
go test -short $(BUILD_FLAGS) -race -cover -v $(PKGS)
go test -short $(BUILD_FLAGS) -race -cover -v ./...
# Run unit tests and collect coverage
.PHONY: test-unit-cover
test-unit-cover:
# First install packages that are dependencies of the test.
go test -short -i -race -cover $(PKGS)
go test -short -i -race -cover ./...
# go test doesn't support colleting coverage across multiple packages,
# generate go test commands using go list and run go test for every package separately
go list -f '"go test -short -race -cover -v -coverprofile={{.Dir}}/.coverprofile {{.ImportPath}}"' github.com/kubernetes/kompose/... | grep -v "vendor" | xargs -L 1 -P4 sh -c
@@ -91,11 +90,6 @@ lint:
gofmt:
./script/check-gofmt.sh
# Checks if there are nested vendor dirs inside Kompose vendor and if vendor was cleaned by glide-vc
.PHONY: check-vendor
check-vendor:
./script/check-vendor.sh
# Run all tests
.PHONY: test
test: bin test-dep validate test-unit-cover install test-cmd