From 0523088fedc3aa259b595c45dd86891a544c29ac Mon Sep 17 00:00:00 2001 From: Mahesh Arumugam Date: Wed, 19 May 2021 10:41:36 -0700 Subject: [PATCH] add darwin-arm64 support --- Makefile | 8 ++++++++ server/dup.go | 2 +- server/dup_arm64.go | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 101746299..3211dc301 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,13 @@ BRANCH_ID := $(BRANCH)-$(GOOS)-$(GOARCH) BUILD_TIME := $(shell date -u +%FT%T%z) SHARD_WIDTH = 20 COMMIT := $(shell git describe --exact-match >/dev/null 2>&1 || git rev-parse --short HEAD) +<<<<<<< HEAD LDFLAGS="-X github.com/pilosa/pilosa/v2.Version=$(VERSION) -X github.com/pilosa/pilosa/v2.BuildTime=$(BUILD_TIME) -X github.com/pilosa/pilosa/v2.Variant=$(VARIANT) -X github.com/pilosa/pilosa/v2.Commit=$(COMMIT) -X github.com/pilosa/pilosa/v2.TrialDeadline=$(TRIAL_DEADLINE)" GO_VERSION=1.15.8 +======= +LDFLAGS="-X github.com/pilosa/pilosa/v2.Version=$(VERSION) -X github.com/pilosa/pilosa/v2.BuildTime=$(BUILD_TIME) -X github.com/pilosa/pilosa/v2.Variant=$(VARIANT) -X github.com/pilosa/pilosa/v2.Commit=$(COMMIT) -X github.com/pilosa/pilosa/v2.LatticeCommit=$(LATTICE_COMMIT) -X github.com/pilosa/pilosa/v2.TrialDeadline=$(TRIAL_DEADLINE)" +GO_VERSION=1.16 +>>>>>>> f47d7a1b (add darwin-arm64 support) DOCKER_BUILD= # set to 1 to use `docker-build` instead of `build` when creating a release BUILD_TAGS += shardwidth$(SHARD_WIDTH) TEST_TAGS = roaringparanoia @@ -114,12 +119,14 @@ endif # Create release build tarballs for all supported platforms. DEPRECATED: Use `docker-release` release: check-clean generate-statik-docker $(MAKE) release-build GOOS=darwin GOARCH=amd64 + $(MAKE) release-build GOOS=darwin GOARCH=arm64 $(MAKE) release-build GOOS=linux GOARCH=amd64 # Create release build tarballs for all supported platforms. Same as `release`, but without embedded Lattice UI. release-sans-ui: check-clean rm -f statik/statik.go $(MAKE) release-build GOOS=darwin GOARCH=amd64 + $(MAKE) release-build GOOS=darwin GOARCH=arm64 $(MAKE) release-build GOOS=linux GOARCH=amd64 # try (e.g.) internal/clustertests/docker-compose-replication2.yml @@ -187,6 +194,7 @@ generate: generate-protoc generate-statik generate-stringer generate-pql docker-release: $(MAKE) docker-build GOOS=linux GOARCH=amd64 $(MAKE) docker-build GOOS=darwin GOARCH=amd64 + $(MAKE) docker-build GOOS=darwin GOARCH=arm64 # Build a release in Docker docker-build: vendor diff --git a/server/dup.go b/server/dup.go index 63d871054..af2116329 100644 --- a/server/dup.go +++ b/server/dup.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -// +build !arm64 +// +build darwin linux,amd64 package server diff --git a/server/dup_arm64.go b/server/dup_arm64.go index 726890fec..8e45eaa76 100644 --- a/server/dup_arm64.go +++ b/server/dup_arm64.go @@ -12,6 +12,8 @@ // See the License for the specific language governing permissions and // limitations under the License. +// +build !darwin,arm64 + package server import (