Skip to content

Commit

Permalink
Adding uname name mapping for x86_64 in hack/install.sh (knative#7917)
Browse files Browse the repository at this point in the history
* fix: uname -m gives x86_64 for the arch, but ko requires amd64. So do a name mapping

* fix: Check the architecture from go env

Signed-off-by: Leo Li <leoli@redhat.com>

---------

Signed-off-by: Leo Li <leoli@redhat.com>
  • Loading branch information
Leo6Leo committed May 14, 2024
1 parent 6b6f6d1 commit 884f0da
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion hack/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ set -o pipefail

export SCALE_CHAOSDUCK_TO_ZERO=1
export REPLICAS=1
export KO_FLAGS=${KO_FLAGS:-"--platform=\"linux/$(uname -m)\""}

KO_ARCH=$(go env | grep GOARCH | awk -F\' '{print $2}')

export KO_FLAGS=${KO_FLAGS:-"--platform=linux/$KO_ARCH"}

source "$(dirname "$0")/../test/e2e-common.sh"

Expand Down

0 comments on commit 884f0da

Please sign in to comment.