This is an automated email from the ASF dual-hosted git repository. pcongiusti pushed a commit to branch release-1.10.x in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 690d291c5139358f7ded6e98d4c7ff79c0b52911 Author: Christoph Deppisch <[email protected]> AuthorDate: Wed Nov 9 22:30:09 2022 +0100 fix(#3800): Add proper kamel linux binary to image build on MacOS --- script/Makefile | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/script/Makefile b/script/Makefile index e5996b028..06293835d 100644 --- a/script/Makefile +++ b/script/Makefile @@ -310,9 +310,6 @@ ifeq ($(shell uname -s 2>/dev/null || echo Unknown),Linux) else go build $(GOFLAGS) -o kamel ./cmd/kamel/*.go endif -ifeq ($(shell uname -m), arm64) - GOOS=linux GOARCH=arm64 go build $(GOFLAGS) -o kamel.linux.arm ./cmd/kamel/*.go -endif build-resources: ./script/get_catalog.sh $(RUNTIME_VERSION) $(STAGING_RUNTIME_REPO) @@ -396,7 +393,15 @@ maven-overlay: kamel-overlay: @echo "####### Copying kamel CLI to output build directory..." mkdir -p build/_output/bin - cp kamel build/_output/bin +ifeq ($(shell uname -m), arm64) + GOOS=linux GOARCH=arm64 go build $(GOFLAGS) -o build/_output/bin/kamel ./cmd/kamel/*.go +else ifneq ($(shell uname -s 2>/dev/null || echo Unknown),Linux) + GOOS=linux go build $(GOFLAGS) -o build/_output/bin/kamel ./cmd/kamel/*.go +else + @{ \ + cp kamel build/_output/bin \ + } +endif images: build kamel-overlay maven-overlay bundle-kamelets @echo "####### Building Camel K operator container image..." @@ -409,7 +414,7 @@ images-arch: build kamel-overlay maven-overlay bundle-kamelets docker buildx rm --all-inactive --force docker buildx create --append --name builder ifeq ($(shell uname -m), x86_x64) - docker buildx build --platform=linux/amd64 -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch . + docker buildx build --platform=linux/amd64 -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch . endif ifeq ($(shell uname -m), aarch64) docker buildx build --platform=linux/arm64 -t $(CUSTOM_IMAGE):$(CUSTOM_VERSION) -f build/Dockerfile.arch .
