Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove vendoring, use Go modules #1287

Closed
wants to merge 1 commit into from
Closed
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.
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ jobs:

- name: Run Revive Action by pulling pre-built image
uses: docker://morphy/revive-action:v2
with:
exclude: "./vendor/..."

- name: Run go fmt
run: go fmt ./...
Expand Down
2 changes: 0 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
env:
- GO111MODULE=on
before:
hooks:
- go mod download
Expand Down
1 change: 0 additions & 1 deletion cmd/multus-shim/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import (
)

func main() {
// Init command line flags to clear vendored packages' one, especially in init()
flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError)

// add version flag
Expand Down
2 changes: 0 additions & 2 deletions cmd/multus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ import (
)

func main() {

// Init command line flags to clear vendored packages' one, especially in init()
flag.CommandLine = flag.NewFlagSet(os.Args[0], flag.ExitOnError)

// add version flag
Expand Down
7 changes: 0 additions & 7 deletions hack/build-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,6 @@ LDFLAGS="-X gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/multus.version=${VER
-X gopkg.in/k8snetworkplumbingwg/multus-cni.v4/pkg/multus.date=${DATE}"
export CGO_ENABLED=${CGO_ENABLED:-0}

# build with go modules
export GO111MODULE=on

if [ -n "$MODMODE" ]; then
BUILD_ARGS=(-mod "$MODMODE")
fi

echo "Building multus"
go build -o ${DEST_DIR}/multus ${BUILD_ARGS} -ldflags "${LDFLAGS}" "$@" ./cmd/multus
echo "Building multus-daemon"
Expand Down
21 changes: 1 addition & 20 deletions hack/test-go.sh
Original file line number Diff line number Diff line change
@@ -1,23 +1,4 @@
#!/usr/bin/env bash
set -e

# this if... will be removed when gomodules goes default
if [ "$GO111MODULE" == "off" ]; then
echo "Warning: this will be deprecated in near future so please use go modules!"

ORG_PATH="gopkg.in/k8snetworkplumbingwg"
REPO_PATH="${ORG_PATH}/multus-cni"

if [ ! -h gopath/src/${REPO_PATH} ]; then
mkdir -p gopath/src/${ORG_PATH}
ln -s ../../../.. gopath/src/${REPO_PATH} || exit 255
fi

export GO15VENDOREXPERIMENT=1
export GOBIN=${PWD}/bin
export GOPATH=${PWD}/gopath
bash -c "umask 0; cd ${GOPATH}/src/${REPO_PATH}; PATH=${GOROOT}/bin:$(pwd)/bin:${PATH} go test -v -covermode=count -coverprofile=coverage.out ./..."
else
# test with go modules
bash -c "umask 0; go test -v -race -covermode=atomic -coverprofile=coverage.out ./..."
fi
bash -c "umask 0; go test -v -race -covermode=atomic -coverprofile=coverage.out ./..."
1 change: 0 additions & 1 deletion images/Dockerfile.openshift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ FROM local/okdbuilder:latest as builder
ADD . /usr/src/multus-cni

WORKDIR /usr/src/multus-cni
ENV GO111MODULE=off
RUN ./hack/build-go.sh

FROM quay.io/openshift/origin-base:latest
Expand Down
1 change: 0 additions & 1 deletion vendor/github.com/Masterminds/semver/v3/.gitignore

This file was deleted.

27 changes: 0 additions & 27 deletions vendor/github.com/Masterminds/semver/v3/.golangci.yml

This file was deleted.

214 changes: 0 additions & 214 deletions vendor/github.com/Masterminds/semver/v3/CHANGELOG.md

This file was deleted.

19 changes: 0 additions & 19 deletions vendor/github.com/Masterminds/semver/v3/LICENSE.txt

This file was deleted.

30 changes: 0 additions & 30 deletions vendor/github.com/Masterminds/semver/v3/Makefile

This file was deleted.

Loading