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 6, 2023
1 parent f63d16e commit a5a1861
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.

35 changes: 0 additions & 35 deletions schema/third_party/VENDOR-LICENSE/github.com/gogo/protobuf/LICENSE

This file was deleted.

Loading

0 comments on commit a5a1861

Please sign in to comment.