Skip to content

Commit

Permalink
Stop vendoring
Browse files Browse the repository at this point in the history
go mod vendor is no longer necessary; see
https://go.dev/ref/mod#vendoring for details. Dependencies will be
fulfilled using the module cache.

The recipes to build vendor/modules.txt are preserved for use by
Shipyard-based projects until they are all updated to no longer rely
on such files.

VENDOR_MODULES and its use in markdownlint are preserved to avoid
errors in Shipyard-based projects until they are updated to no longer
vendor.

Fixes: #804
Signed-off-by: Stephen Kitt <[email protected]>
  • Loading branch information
skitt authored and dfarrell07 committed Jan 12, 2023
1 parent da88cc6 commit 0449a95
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/scripts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c

- name: Test the compile.sh script
run: make vendor/modules.txt script-test SCRIPT_TEST_ARGS="test/scripts/compile/test.sh"
run: make script-test SCRIPT_TEST_ARGS="test/scripts/compile/test.sh"

deploy:
name: Deploy
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ package/.image.nettest package/.image.shipyard-dapper-base: ;
# Project-specific targets go here
deploy: package/.image.nettest

e2e: $(VENDOR_MODULES) clusters
e2e: clusters

else

Expand Down
6 changes: 3 additions & 3 deletions Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -219,11 +219,11 @@ gitlint:
gitlint --config $(SHIPYARD_DIR)/.gitlint --commits origin/$(BASE_BRANCH)..HEAD; \
fi

# List of vendor/modules.txt files we need
# List of vendor/modules.txt files we might encounter
VENDOR_MODULES := $(shell find . -name vendor -prune -o -name go.mod -printf "%h/vendor/modules.txt\n")

# [golangci-lint] validates Go code in the project
golangci-lint: $(VENDOR_MODULES)
golangci-lint:
ifneq (,$(shell find . -name '*.go'))
golangci-lint version
golangci-lint linters
Expand Down Expand Up @@ -279,7 +279,7 @@ post-mortem:
$(SCRIPTS_DIR)/post_mortem.sh

# [unit] executes the Go unit tests of the project
unit: $(VENDOR_MODULES)
unit:
$(SCRIPTS_DIR)/unit_test.sh $(UNIT_TEST_ARGS)

vendor/modules.txt: go.mod
Expand Down
2 changes: 1 addition & 1 deletion package/Dockerfile.shipyard-dapper-base
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ENV DAPPER_HOST_ARCH=amd64 SHIPYARD_DIR=/opt/shipyard SHELL=/bin/bash \
DAPPER_RUN_ARGS="--net=kind"
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH} PATH=/go/bin:/root/.local/bin:/usr/local/go/bin:$PATH \
GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH=GOLANG_ARCH_${DAPPER_HOST_ARCH} \
GOPATH=/go GO111MODULE=on GOFLAGS=-mod=vendor GOPROXY=https://proxy.golang.org \
GOPATH=/go GO111MODULE=on GOPROXY=https://proxy.golang.org \
SCRIPTS_DIR=${SHIPYARD_DIR}/scripts

# Requirements:
Expand Down

0 comments on commit 0449a95

Please sign in to comment.