Skip to content

Commit

Permalink
upgrade to latest dependencies
Browse files Browse the repository at this point in the history
bumping knative.dev/hack 38316f2...34850cd:
  > 34850cd Update community files (# 319)
  > da6e74c 🐛 The `go.work.sum` don't influence the dependencies resolution (# 317)
  > c4a34c3 Collect LICENSE files from all dependencies, even without vendor dir (# 316)

Signed-off-by: Knative Automation <[email protected]>
  • Loading branch information
knative-automation committed Sep 25, 2023
1 parent 72aa7ce commit 4902958
Show file tree
Hide file tree
Showing 5 changed files with 39 additions and 22 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
google.golang.org/grpc v1.36.0
gopkg.in/go-playground/webhooks.v3 v3.13.0
gopkg.in/yaml.v2 v2.3.0
knative.dev/hack v0.0.0-20230919151801-38316f28f0bf
knative.dev/hack v0.0.0-20230922134855-34850cddd60a
)

require (
Expand Down
6 changes: 3 additions & 3 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXf
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
Expand Down Expand Up @@ -539,8 +539,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9
honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
honnef.co/go/tools v0.0.1-2020.1.5 h1:nI5egYTGJakVyOryqLs1cQO5dO0ksin5XXs2pspk75k=
honnef.co/go/tools v0.0.1-2020.1.5/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k=
knative.dev/hack v0.0.0-20230919151801-38316f28f0bf h1:Hyyc838y8572zTWTuL2ymWAiAhL2ujz7OLlB/KMtHF0=
knative.dev/hack v0.0.0-20230919151801-38316f28f0bf/go.mod h1:dx0YG3YWqJu653e9tjcT0Q1ZdS9JJXLKbUhzr4EB0g8=
knative.dev/hack v0.0.0-20230922134855-34850cddd60a h1:49UQAWesCa31hlEr+hJV1olDlK+ZhyYwI+KEFTgC8K8=
knative.dev/hack v0.0.0-20230922134855-34850cddd60a/go.mod h1:WA6zi0u24QTDuFZUeqBwSerEh4Io8lxe6UmvolOzA24=
rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8=
rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0=
rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA=
2 changes: 0 additions & 2 deletions vendor/knative.dev/hack/go.work.sum

This file was deleted.

49 changes: 34 additions & 15 deletions vendor/knative.dev/hack/library.sh
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,30 @@ function foreach_go_module() {
# global env var: FLOATING_DEPS
# --upgrade will set GOPROXY to direct unless it is already set.
function go_update_deps() {
# The go.work.sum will be truncated if it exists. This is to allow the
# `go mod tidy` to resolve the dependencies, without the influence of the
# sums from the workspace.
__clean_goworksum_if_exists
foreach_go_module __go_update_deps_for_module "$@"
__remove_goworksum_if_empty
}

function __clean_goworksum_if_exists() {
if [ -f "$REPO_ROOT_DIR/go.work.sum" ]; then
echo "=== Cleaning the go.work.sum file"
true > "$REPO_ROOT_DIR/go.work.sum"
fi
}

function __remove_goworksum_if_empty() {
if [ -f "$REPO_ROOT_DIR/go.work" ]; then
echo "=== Syncing the go workspace"
go work sync
fi
if ! [ -s "$REPO_ROOT_DIR/go.work.sum" ]; then
echo "=== Removing empty go.work.sum"
rm -f "$REPO_ROOT_DIR/go.work.sum"
fi
}

function __go_update_deps_for_module() {
Expand Down Expand Up @@ -731,26 +754,22 @@ function __go_update_deps_for_module() {
fi
eval "$orig_pipefail_opt"

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

group "Removing unwanted vendor files"
if [[ "${FORCE_VENDOR:-false}" == "true" ]] || [ -d vendor ]; then
group "Removing unwanted vendor files"
find vendor/ \( -name "OWNERS" \
-o -name "OWNERS_ALIASES" \
-o -name "BUILD" \
-o -name "BUILD.bazel" \
-o -name "*_test.go" \) -exec rm -f {} +

# Remove unwanted vendor files
find vendor/ \( -name "OWNERS" \
-o -name "OWNERS_ALIASES" \
-o -name "BUILD" \
-o -name "BUILD.bazel" \
-o -name "*_test.go" \) -exec rm -f {} +
export GOFLAGS=-mod=vendor

export GOFLAGS=-mod=vendor
group "Removing broken symlinks"
remove_broken_symlinks ./vendor
fi

group "Updating licenses"
update_licenses third_party/VENDOR-LICENSE "./..."

group "Removing broken symlinks"
remove_broken_symlinks ./vendor
)
}

Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ gopkg.in/go-playground/webhooks.v3/github
gopkg.in/yaml.v2
# honnef.co/go/tools v0.0.1-2020.1.5
## explicit; go 1.11
# knative.dev/hack v0.0.0-20230919151801-38316f28f0bf
# knative.dev/hack v0.0.0-20230922134855-34850cddd60a
## explicit; go 1.18
knative.dev/hack
# go.opencensus.io => go.opencensus.io v0.20.2

0 comments on commit 4902958

Please sign in to comment.