Skip to content

Commit

Permalink
Merge pull request #951 from tristanmorgan/remove_vendor
Browse files Browse the repository at this point in the history
Remove vendored modules in favour of go mod.
  • Loading branch information
tristanmorgan authored Sep 2, 2024
2 parents 7bfa3f6 + 2abe626 commit ccb2e62
Show file tree
Hide file tree
Showing 2,173 changed files with 5 additions and 692,325 deletions.
5 changes: 3 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ RUN cd /usr/local/bin && unzip vault_${vault_version}_linux_amd64.zip
RUN apk update && apk add --no-cache git
WORKDIR /src
COPY . .
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go test -mod=vendor -trimpath -ldflags "-s -w" ./...
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -mod=vendor -trimpath -ldflags "-s -w"
RUN go mod tidy
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go test -trimpath -ldflags "-s -w" ./...
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -trimpath -ldflags "-s -w"

FROM alpine:3.16
RUN apk update && apk add --no-cache ca-certificates
Expand Down
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ VERSION ?= $(shell git describe --tags --first-parent --abbrev=0 | cut -c 2-)


# GOFLAGS is the flags for the go compiler.
GOFLAGS ?= -mod=vendor -ldflags "-X main.version=$(CUR_TAG)"
GOFLAGS ?= -ldflags "-X main.version=$(CUR_TAG)"

# GOVERSION is the current go version, e.g. go1.9.2
GOVERSION ?= $(shell go version | awk '{print $$3;}')
Expand Down Expand Up @@ -64,12 +64,11 @@ test: build
.PHONY: mod
mod:
go mod tidy
go mod vendor

# gofmt runs gofmt on the code
.PHONY: gofmt
gofmt:
gofmt -s -w `find . -type f -name '*.go' | grep -v vendor`
gofmt -s -w `find . -type f -name '*.go'`


beta: $(BETA_OSES)
Expand Down
27 changes: 0 additions & 27 deletions vendor/github.com/Shopify/sarama/.gitignore

This file was deleted.

36 changes: 0 additions & 36 deletions vendor/github.com/Shopify/sarama/.travis.yml

This file was deleted.

Loading

0 comments on commit ccb2e62

Please sign in to comment.