From 96f0937a7e74acd6bace93b9ba99190f2b0c0640 Mon Sep 17 00:00:00 2001 From: Dirk Kulawiak Date: Tue, 13 Jun 2023 12:47:48 +0200 Subject: [PATCH] Add buildprocess for macos --- .goreleaser.yaml | 23 +++++++++++++++++++++++ tools/dev/build.sh | 14 ++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 .goreleaser.yaml create mode 100755 tools/dev/build.sh diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000000..ebbd13cb29 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,23 @@ +before: + hooks: + # You may remove this if you don't use go modules. + - go mod tidy +builds: + - env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + main: ./cmd/weaviate-server + goarch: + - amd64 + - arm64 + ldflags: + - -w + - -extldflags "-static" + - -X github.com/weaviate/weaviate/usecases/config.GitHash={{ .Env.GIT_HASH }} + +# create a "fat" binary for MacOS +universal_binaries: + - replace: true + diff --git a/tools/dev/build.sh b/tools/dev/build.sh new file mode 100755 index 0000000000..ef4f6cae4d --- /dev/null +++ b/tools/dev/build.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# +# run from weaviate Root + +export GIT_HASH=$(git rev-parse --short HEAD) +goreleaser build --clean --snapshot + +codesign -f -o runtime --timestamp -s "Developer ID Application: Weaviate B.V. (QUZ8SKLS6R)" dist/weaviate_darwin_all/weaviate + +zip dist/weaviate_darwin_all.zip dist/weaviate_darwin_all/weaviate + +codesign -f -o runtime --timestamp -s "Developer ID Application: Weaviate B.V. (QUZ8SKLS6R)" dist/weaviate_darwin_all.zip + +xcrun notarytool submit dist/weaviate_darwin_all.zip --keychain-profile "AC_PASSWORD_PRIVAT" --wait