mirror of
https://github.com/ollama/ollama.git
synced 2025-05-11 10:26:53 +02:00
darwin build script
This commit is contained in:
parent
227da16909
commit
ed832ce3b7
3 changed files with 20 additions and 18 deletions
18
scripts/build_darwin.sh
Executable file
18
scripts/build_darwin.sh
Executable file
|
@ -0,0 +1,18 @@
|
|||
#!/bin/bash
|
||||
|
||||
mkdir -p dist
|
||||
|
||||
# build and sign the universal binary
|
||||
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
|
||||
rm dist/ollama_amd64 dist/ollama_arm64
|
||||
codesign --deep --force --options=runtime --sign "$APPLE_IDENTITY" --timestamp ./dist/ollama
|
||||
xcrun altool --notarize-app --username="$APPLE_ID" --password "$APPLE_PASSWORD" --file ./dist/ollama
|
||||
|
||||
# build and sign the mac app
|
||||
npm run --prefix app make:sign
|
||||
cp app/out/make/zip/darwin/universal/Ollama-darwin-universal-${VERSION:-0.0.0}.zip dist/Ollama-darwin.zip
|
||||
|
||||
# rename the cli after its been packaged
|
||||
mv dist/ollama dist/ollama-darwin
|
Loading…
Add table
Add a link
Reference in a new issue