diff --git a/cmd/zbctl/build.sh b/cmd/zbctl/build.sh index b4a575f0..69c4f716 100755 --- a/cmd/zbctl/build.sh +++ b/cmd/zbctl/build.sh @@ -1,7 +1,9 @@ #!/bin/bash -xeu -OS=( linux windows darwin ) -BINARY=( zbctl zbctl.exe zbctl.darwin ) +OS=( linux windows darwin darwin ) +ARCH=( amd64 amd64 amd64 arm64 ) +BINARY=( zbctl zbctl.exe zbctl.darwin-amd64 zbctl.darwin-arm64 ) + SRC_DIR=$(dirname "${BASH_SOURCE[0]}") DIST_DIR="$SRC_DIR/dist" @@ -13,7 +15,7 @@ rm -rf ${DIST_DIR}/* for i in "${!OS[@]}"; do if [ $# -eq 0 ] || [ ${OS[$i]} = $1 ]; then - CGO_ENABLED=0 GOOS="${OS[$i]}" GOARCH=amd64 go build -a -tags netgo -ldflags "-w -X github.com/camunda-community-hub/zeebe-client-go/v8/cmd/zbctl/internal/commands.Version=${VERSION} -X github.com/camunda-community-hub/zeebe-client-go/v8/cmd/zbctl/internal/commands.Commit=${COMMIT}" -o "${DIST_DIR}/${BINARY[$i]}" "${SRC_DIR}/main.go" & + CGO_ENABLED=0 GOOS="${OS[$i]}" GOARCH="${ARCH[$i]}" go build -a -tags netgo -ldflags "-w -X github.com/camunda-community-hub/zeebe-client-go/v8/cmd/zbctl/internal/commands.Version=${VERSION} -X github.com/camunda-community-hub/zeebe-client-go/v8/cmd/zbctl/internal/commands.Commit=${COMMIT}" -o "${DIST_DIR}/${BINARY[$i]}" "${SRC_DIR}/main.go" & fi done