build for universal architecture on macos

This commit is contained in:
Jeffrey Morgan
2023-07-28 12:18:11 -04:00
parent 67b6f8ba86
commit c75cafdb58
6 changed files with 24 additions and 12 deletions

7
scripts/build.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
mkdir -p dist
CGO_ENABLED=1 GOARCH=arm64 go build -o dist/ollama_arm64
CGO_ENABLED=1 GOARCH=amd64 go build -o dist/ollama_amd64
lipo -create -output dist/ollama dist/ollama_arm64 dist/ollama_amd64
npm run --prefix app make:sign

View File

@ -10,9 +10,7 @@ fi
OS=$(go env GOOS)
ARCH=$(go env GOARCH)
go build .
npm --prefix app run make:sign
./script/build.sh
# Create a new tag if it doesn't exist.
if ! git rev-parse v$VERSION >/dev/null 2>&1; then