Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Stop using vendoring to match team standards #242

Merged
merged 1 commit into from
May 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ COPY main.go main.go
COPY api/ api/
COPY controllers/ controllers/
COPY pkg/ pkg/
COPY vendor/ vendor/

# Build
RUN CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -mod=vendor -a -ldflags "${LDFLAGS}" -o manager main.go
RUN CGO_ENABLED=0 GOOS=${GOOS} GOARCH=${GOARCH} go build -a -ldflags "${LDFLAGS}" -o manager main.go

# Use distroless as minimal base image to package the manager binary
# Refer to https://github.com/GoogleContainerTools/distroless for more details
Expand Down
12 changes: 3 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,6 @@ fmt: ## Run go fmt against code.
vet: ## Run go vet against code.
GOFLAGS=$(GOFLAGS) go vet ./...

.PHONY: vendor
vendor: ## Run go mod vendor
GO111MODULE=on GOFLAGS=$(GOFLAGS) go mod vendor

.PHONY: tidy
tidy: ## Run go mod tidy
GO111MODULE=on GOFLAGS=$(GOFLAGS) go mod tidy
Expand Down Expand Up @@ -160,8 +156,7 @@ docker-push: ## Push docker image with the manager.
.PHONY: .ensure-go-bindata
BINDATA_OUTPUT_FILE := ./pkg/bindata/bindata.go
.ensure-go-bindata:
ln -s $(abspath ./vendor) "$${TMP_GOPATH}/src"
export GO111MODULE=off && export GOPATH=$${TMP_GOPATH} && export GOBIN=$${TMP_GOPATH}/bin && GOFLAGS=$(GOFLAGS) go install "./vendor/github.com/go-bindata/go-bindata/..."
export GOPATH=$${TMP_GOPATH} && export GOBIN=$${TMP_GOPATH}/bin && GOFLAGS=$(GOFLAGS) go install "github.com/go-bindata/go-bindata/go-bindata@v3.1.2+incompatible"

.PHONY: .run-bindata
.run-bindata: .ensure-go-bindata
Expand All @@ -177,6 +172,7 @@ BINDATA_OUTPUT_FILE := ./pkg/bindata/bindata.go
update-bindata:
export TMP_GOPATH=$$(mktemp -d) ;\
$(MAKE) .run-bindata ;\
GOPATH=$${TMP_GOPATH} GOFLAGS=$(GOFLAGS) go clean -modcache
rm -rf "$${TMP_GOPATH}"

.PHONY: verify-bindata
Expand All @@ -192,6 +188,7 @@ verify-bindata:
exit 1 ;\
fi ;\
rm -rf "$${TMP_DIR}" ;\
GOPATH=$${TMP_GOPATH} GOFLAGS=$(GOFLAGS) go clean -modcache
rm -rf "$${TMP_GOPATH}"

.PHONY: release
Expand Down Expand Up @@ -435,9 +432,6 @@ KUBERNETES_VERSION ?= v1.21.1
BATS_VERSION ?= 1.2.1
OLM_VERSION ?= v0.18.2

# Use the vendored directory
GOFLAGS = -mod=vendor
mprahl marked this conversation as resolved.
Show resolved Hide resolved

# Set version variables for LDFLAGS
GIT_VERSION ?= $(shell git describe --match='v*' --always --dirty)
GIT_HASH ?= $(shell git rev-parse HEAD)
Expand Down
202 changes: 0 additions & 202 deletions vendor/cloud.google.com/go/LICENSE

This file was deleted.

Loading