-
Notifications
You must be signed in to change notification settings - Fork 574
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
Adding uname name mapping for x86_64 in hack/install.sh #7917
Conversation
/cc @Cali0707 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #7917 +/- ##
==========================================
+ Coverage 69.22% 69.33% +0.11%
==========================================
Files 339 344 +5
Lines 19494 15911 -3583
==========================================
- Hits 13494 11032 -2462
+ Misses 5337 4197 -1140
- Partials 663 682 +19 ☔ View full report in Codecov by Sentry. |
hack/install.sh
Outdated
ARCH=$(uname -m) | ||
case "$ARCH" in | ||
x86_64) KO_ARCH="amd64" ;; | ||
arm64) KO_ARCH="arm64" ;; | ||
*) echo "Unsupported architecture: $ARCH" && exit 1 ;; | ||
esac | ||
|
||
export KO_FLAGS=${KO_FLAGS:-"--platform=linux/$KO_ARCH"} |
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.
Hey @Leo6Leo now that I think about this a bit more, I think maybe a better approach would be to check the architecture from go env
, as that would match the name of the architecture used by ko
.
Maybe something like:
go env -json | jq .GOARCH -r
But, this would add a dependency on jq
🤷
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.
this is without jq
$ go env | grep GOARCH | awk -F\' '{print $2}'
amd64
Signed-off-by: Leo Li <leoli@redhat.com>
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.
/lgtm
Thanks for fixing this @Leo6Leo !
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Cali0707, Leo6Leo 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 |
In the hack/install.sh script, the
uname -m
gives x86_64 for the arch, but ko requires amd64Proposed Changes
Pre-review Checklist
Release Note
Docs