Skip to content

Commit

Permalink
Allow to not vendor the dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
cardil committed Sep 5, 2023
1 parent 59b2231 commit b3fc86b
Show file tree
Hide file tree
Showing 691 changed files with 50 additions and 229,903 deletions.
1 change: 1 addition & 0 deletions go.work
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ use (
.
schema
test
test/vendorproj
)
13 changes: 9 additions & 4 deletions library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -718,18 +718,23 @@ function __go_update_deps_for_module() {
fi
fi

group "Go mod tidy and vendor"
group "Go mod tidy"

# Prune modules.
local orig_pipefail_opt=$(shopt -p -o pipefail)
local orig_pipefail_opt
orig_pipefail_opt=$(shopt -p -o pipefail)
set -o pipefail
go mod tidy 2>&1 | grep -v "ignoring symlink" || true
go mod vendor 2>&1 | grep -v "ignoring symlink" || true
if [[ "${FORCE_VENDOR:-false}" == "true" ]] || [ -d vendor ]; then
group "Go mod vendor"
go mod vendor 2>&1 | grep -v "ignoring symlink" || true
fi
eval "$orig_pipefail_opt"

if ! [ -d vendor ]; then
if ! [[ "${FORCE_VENDOR:-false}" == "true" ]] && ! [ -d vendor ]; then
return 0
fi

group "Removing unwanted vendor files"

# Remove unwanted vendor files
Expand Down
201 changes: 0 additions & 201 deletions schema/third_party/VENDOR-LICENSE/github.com/go-logr/logr/LICENSE

This file was deleted.

This file was deleted.

Loading

0 comments on commit b3fc86b

Please sign in to comment.