Skip to content

Fix update-codegen.sh when run outside GOPATH #18

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

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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ require (
k8s.io/apimachinery v0.18.1
k8s.io/client-go v11.0.1-0.20190805182717-6502b5e7b1b5+incompatible
k8s.io/code-generator v0.18.0
knative.dev/pkg v0.0.0-20200623024526-fb0320d9287e
knative.dev/pkg v0.0.0-20200623173527-5658d93fb07e
knative.dev/sample-controller v0.0.0-20200510050845-bf7c19498b7e
knative.dev/test-infra v0.0.0-20200623005026-1f7e5f05c52b
knative.dev/test-infra v0.0.0-20200623145727-e9ff5263be06
)

replace (
Expand Down
12 changes: 4 additions & 8 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1386,10 +1386,9 @@ knative.dev/pkg v0.0.0-20200515002500-16d7b963416f/go.mod h1:tMOHGbxtRz8zYFGEGpV
knative.dev/pkg v0.0.0-20200520073958-94316e20e860/go.mod h1:QgNZTxnwpB/oSpNcfnLVlw+WpEwwyKAvJlvR3hgeltA=
knative.dev/pkg v0.0.0-20200603222317-b79e4a24ca50/go.mod h1:8IfPj/lpuKHHg82xZCl2wuFZ3BM96To72sN1W8T9wjQ=
knative.dev/pkg v0.0.0-20200611204322-2ddcfef739a2/go.mod h1:rA+FklsrVahwF4a+D63NyHJlzDoAFH81K4J5CYuE3bA=
knative.dev/pkg v0.0.0-20200619020725-7df8fc5d7743 h1:W1NKMizoXYYX5e2mkFXnn21T7X6ROKKwL8YetGu7xCQ=
knative.dev/pkg v0.0.0-20200619020725-7df8fc5d7743/go.mod h1:DquzK0hsLDcg2q63Sn+CngAyRwv4cKMpt5F19YzBfb0=
knative.dev/pkg v0.0.0-20200623024526-fb0320d9287e h1:fmsw4i/We4S9yyaZadL2z8DKDIz7XzcY/v4yPGUmUA4=
knative.dev/pkg v0.0.0-20200623024526-fb0320d9287e/go.mod h1:DquzK0hsLDcg2q63Sn+CngAyRwv4cKMpt5F19YzBfb0=
knative.dev/pkg v0.0.0-20200623173527-5658d93fb07e h1:MhQNsqYZ5BuDyZT/Q5MQMTMYTmkLcwq6MY+gGvPkymY=
knative.dev/pkg v0.0.0-20200623173527-5658d93fb07e/go.mod h1:DquzK0hsLDcg2q63Sn+CngAyRwv4cKMpt5F19YzBfb0=
knative.dev/sample-controller v0.0.0-20200510050845-bf7c19498b7e h1:I6nRhlOCuFMShAMRhbe9c0+pbfQHttUWZMqVVtRnNt0=
knative.dev/sample-controller v0.0.0-20200510050845-bf7c19498b7e/go.mod h1:D2ZDLrR9Dq9LiiVN7TatzI7WMcEPgk1MHbbhgBKE6W8=
knative.dev/test-infra v0.0.0-20200407185800-1b88cb3b45a5/go.mod h1:xcdUkMJrLlBswIZqL5zCuBFOC22WIPMQoVX1L35i0vQ=
Expand All @@ -1399,12 +1398,10 @@ knative.dev/test-infra v0.0.0-20200509000045-c7114387eed5/go.mod h1:aMif0KXL4g19
knative.dev/test-infra v0.0.0-20200513011557-d03429a76034/go.mod h1:aMif0KXL4g19YCYwsy4Ocjjz5xgPlseYV+B95Oo4JGE=
knative.dev/test-infra v0.0.0-20200519015156-82551620b0a9/go.mod h1:A5b2OAXTOeHT3hHhVQm3dmtbuWvIDP7qzgtqxA3/2pE=
knative.dev/test-infra v0.0.0-20200522180958-6a0a9b9d893a/go.mod h1:n9eQkzmSNj8BiqNFl1lzoz68D09uMeJfyOjc132Gbik=
knative.dev/test-infra v0.0.0-20200606045118-14ebc4a42974 h1:CrZmlbB+j3ZF/aTrfyypY5ulX2w7XrkfeXKQsbkqzTg=
knative.dev/test-infra v0.0.0-20200606045118-14ebc4a42974/go.mod h1://I6IZIF0QDgs5wotU243ZZ5cTpm6/GthayjUenBBc0=
knative.dev/test-infra v0.0.0-20200617235125-6382dba95484 h1:5D1Fm6aA1T1QQXLb1HkJ5t8gB9pTkhLYak1CCqIP+pE=
knative.dev/test-infra v0.0.0-20200617235125-6382dba95484/go.mod h1:+BfrTJpc++rH30gX/C0QY6NT2eYVzycll52uw6CrQnc=
knative.dev/test-infra v0.0.0-20200623005026-1f7e5f05c52b h1:qQTd9xCiV3/PVt2LsmELMVL2gT4eAScMaFrPqiQnt1I=
knative.dev/test-infra v0.0.0-20200623005026-1f7e5f05c52b/go.mod h1:H8QEB2Y35+vAuVtDbn7QBD+NQr9zQbbxNiovCLNH7F4=
knative.dev/test-infra v0.0.0-20200623145727-e9ff5263be06 h1:6LNkyjc5iPk+Q47wwixmc9CL/0GIL40wZWGlwHXTDRc=
knative.dev/test-infra v0.0.0-20200623145727-e9ff5263be06/go.mod h1:qKM6vO6hD6aa0ZYGDdyr5YiXPQMhbix1K8UWPUvVlIE=
modernc.org/cc v1.0.0/go.mod h1:1Sk4//wdnYJiUIxnW8ddKpaOJCF37yAdqYnkxUpaYxw=
modernc.org/golex v1.0.0/go.mod h1:b/QX9oBD/LhixY6NDh+IdGv17hgB+51fET1i2kPSmvk=
modernc.org/mathutil v1.0.0/go.mod h1:wU0vUrJsVWBZ4P6e7xtFJEhFSNsfRLJ8H458uRjg03k=
Expand All @@ -1425,7 +1422,6 @@ sigs.k8s.io/structured-merge-diff v0.0.0-20190525122527-15d366b2352e/go.mod h1:w
sigs.k8s.io/structured-merge-diff/v2 v2.0.1/go.mod h1:Wb7vfKAodbKgf6tn1Kl0VvGj7mRH6DGaRcixXEJXTsE=
sigs.k8s.io/structured-merge-diff/v3 v3.0.0-20200116222232-67a7b8c61874/go.mod h1:PlARxl6Hbt/+BC80dRLi1qAmnMqwqDg62YvvVkZjemw=
sigs.k8s.io/testing_frameworks v0.1.1/go.mod h1:VVBKrHmJ6Ekkfz284YKhQePcdycOzNH9qL6ht1zEr/U=
sigs.k8s.io/yaml v1.1.0 h1:4A07+ZFc2wgJwo8YNlQpr1rVlgUDlxXHhPJciaPY5gs=
sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
sigs.k8s.io/yaml v1.2.0 h1:kr/MCeFWJWTwyaHoR9c8EjH9OumOmoF9YGiZd7lFm/Q=
sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
Expand Down
40 changes: 40 additions & 0 deletions hack/patches/0001-Patch-to-fix-generate-groups.sh.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
From 682f06406c73726775c973f9abc72a0b80a97bad Mon Sep 17 00:00:00 2001
From: Jon Donovan <[email protected]>
Date: Thu, 18 Jun 2020 23:12:55 -0700
Subject: [PATCH] Patch to fix generate-groups.sh

---
vendor/k8s.io/code-generator/generate-groups.sh | 2 +-
vendor/k8s.io/code-generator/generate-internal-groups.sh | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/vendor/k8s.io/code-generator/generate-groups.sh b/vendor/k8s.io/code-generator/generate-groups.sh
index d82002d..e2b694a 100755
--- a/vendor/k8s.io/code-generator/generate-groups.sh
+++ b/vendor/k8s.io/code-generator/generate-groups.sh
@@ -50,7 +50,7 @@ shift 4
# To support running this script from anywhere, we have to first cd into this directory
# so we can install the tools.
cd "$(dirname "${0}")"
- go install ./cmd/{defaulter-gen,client-gen,lister-gen,informer-gen,deepcopy-gen}
+ go install "$(pwd -P)"/cmd/{defaulter-gen,client-gen,lister-gen,informer-gen,deepcopy-gen}
)

function codegen::join() { local IFS="$1"; shift; echo "$*"; }
diff --git a/vendor/k8s.io/code-generator/generate-internal-groups.sh b/vendor/k8s.io/code-generator/generate-internal-groups.sh
index 8c31d93..ef6bd5b 100755
--- a/vendor/k8s.io/code-generator/generate-internal-groups.sh
+++ b/vendor/k8s.io/code-generator/generate-internal-groups.sh
@@ -47,7 +47,8 @@ EXT_APIS_PKG="$4"
GROUPS_WITH_VERSIONS="$5"
shift 5

-go install ./"$(dirname "${0}")"/cmd/{defaulter-gen,conversion-gen,client-gen,lister-gen,informer-gen,deepcopy-gen,openapi-gen}
+cd "$(dirname "${0}")"
+go install "$(pwd -P)"/cmd/{defaulter-gen,conversion-gen,client-gen,lister-gen,informer-gen,deepcopy-gen,openapi-gen}

function codegen::join() { local IFS="$1"; shift; echo "$*"; }


2.27.0.278.ge193c7cf3a9-goog

2 changes: 2 additions & 0 deletions hack/update-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ rm -rf $(find vendor/ -name '*_test.go')
# Add permission for shell scripts
chmod +x $(find vendor -name '*.sh')

git apply ./hack/patches/*.patch


export GOFLAGS=-mod=vendor
update_licenses third_party/VENDOR-LICENSE "./..."

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion vendor/k8s.io/code-generator/generate-groups.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/k8s.io/code-generator/generate-internal-groups.sh

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func isKRShaped(tags map[string]map[string]string) bool {
if !has {
return false
}
return vals["krshapedlogic"] == "true"
return vals["krshapedlogic"] != "false"
}

func isNonNamespaced(tags map[string]map[string]string) bool {
Expand Down
4 changes: 2 additions & 2 deletions vendor/knative.dev/pkg/test/spoof/spoof.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ import (
"knative.dev/pkg/test/ingress"
"knative.dev/pkg/test/logging"
"knative.dev/pkg/test/zipkin"
"knative.dev/pkg/tracing/propagation/tracecontextb3"

"go.opencensus.io/plugin/ochttp"
"go.opencensus.io/plugin/ochttp/propagation/b3"
"go.opencensus.io/trace"
)

Expand Down Expand Up @@ -135,7 +135,7 @@ func New(
// Enable Zipkin tracing
roundTripper := &ochttp.Transport{
Base: transport,
Propagation: &b3.HTTPFormat{},
Propagation: tracecontextb3.TraceContextEgress,
}

sc := SpoofingClient{
Expand Down
Loading