diff --git a/.github/workflows/release-hgctl.yaml b/.github/workflows/release-hgctl.yaml index 13f4c71e7c..40be0df092 100644 --- a/.github/workflows/release-hgctl.yaml +++ b/.github/workflows/release-hgctl.yaml @@ -84,7 +84,9 @@ jobs: - name: Build hgctl latest macos binaries run: | - GOPROXY="https://proxy.golang.org,direct" make build-hgctl-macos + cd ./hgctl + mkdir -p ./out/darwin_amd64/ + go build -o ./out/darwin_amd64/ ./cmd/hgctl tar -zcvf hgctl_${{ env.HGCTL_VERSION }}_darwin_amd64.tar.gz out/darwin_amd64/ tar -zcvf hgctl_${{ env.HGCTL_VERSION }}_darwin_arm64.tar.gz out/darwin_arm64/ diff --git a/Makefile.core.mk b/Makefile.core.mk index b1f032652d..85a179953d 100644 --- a/Makefile.core.mk +++ b/Makefile.core.mk @@ -105,8 +105,8 @@ build-hgctl-multiarch: prebuild $(OUT) .PHONY: build-hgctl-macos build-hgctl-macos: prebuild $(OUT) - CGO_ENABLED=1 GOPROXY=$(GOPROXY) GOOS=darwin GOARCH=amd64 LDFLAGS=$(RELEASE_LDFLAGS) PROJECT_DIR="$(HGCTL_PROJECT_DIR)" tools/hack/gobuild.sh ./out/darwin_amd64/ $(HGCTL_BINARIES) - CGO_ENABLED=1 GOPROXY=$(GOPROXY) GOOS=darwin GOARCH=arm64 LDFLAGS=$(RELEASE_LDFLAGS) PROJECT_DIR="$(HGCTL_PROJECT_DIR)" tools/hack/gobuild.sh ./out/darwin_arm64/ $(HGCTL_BINARIES) + CGO_ENABLED=1 GOPROXY=$(GOPROXY) GOOS=darwin GOARCH=amd64 LDFLAGS="-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn" PROJECT_DIR="$(HGCTL_PROJECT_DIR)" tools/hack/gobuild.sh ./out/darwin_amd64/ $(HGCTL_BINARIES) + CGO_ENABLED=1 GOPROXY=$(GOPROXY) GOOS=darwin GOARCH=arm64 LDFLAGS="-X google.golang.org/protobuf/reflect/protoregistry.conflictPolicy=warn" PROJECT_DIR="$(HGCTL_PROJECT_DIR)" tools/hack/gobuild.sh ./out/darwin_arm64/ $(HGCTL_BINARIES) # Create targets for OUT_LINUX/binary # There are two use cases here: