-
Notifications
You must be signed in to change notification settings - Fork 34
Remove go.mod suffix when grabbing code-generator version #73
Conversation
/cc @Jeffwan |
hack/update-codegen.sh
Outdated
@@ -25,7 +25,7 @@ SCRIPT_ROOT=$(dirname "${BASH_SOURCE[0]}")/.. | |||
ROOT_PKG=github.com/kubeflow/mxnet-operator | |||
|
|||
# Grab code-generator version from go.sum | |||
CODEGEN_VERSION=$(grep 'k8s.io/code-generator' go.sum | awk '{print $2}' | head -1) | |||
CODEGEN_VERSION=$(grep 'k8s.io/code-generator' go.sum | awk '{print $2}' | sed 's/go.mod//g' | head -1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo 'k8s.io/code-generator v0.15.10/go.mod h1:G8bQwmHm2eafm5bgtX67XDZQ8CWKSGu9DekI+yN4Y5I=' | awk '{print $2}' | head -1 | sed 's/go.mod//g'
The result is v0.15.10/
I think we need to change to sed 's/\/go.mod//g'
which has a extra /
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch. Done. Although it would work even with extra /
/lgtm |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Jeffwan, terrytangyuan The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This fixes cases like
k8s.io/code-generator v0.15.10/go.mod h1:G8bQwmHm2eafm5bgtX67XDZQ8CWKSGu9DekI+yN4Y5I=
.