Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
ollama
Commits
ed832ce3
Commit
ed832ce3
authored
Jul 28, 2023
by
Jeffrey Morgan
Browse files
darwin build script
parent
227da169
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
11 deletions
+20
-11
scripts/build_darwin.sh
scripts/build_darwin.sh
+18
-0
scripts/publish.sh
scripts/publish.sh
+2
-11
No files found.
scripts/build.sh
→
scripts/build
_darwin
.sh
View file @
ed832ce3
#!/bin/bash
#!/bin/bash
mkdir
-p
dist
mkdir
-p
dist
# build and sign the universal binary
CGO_ENABLED
=
1
GOARCH
=
arm64 go build
-o
dist/ollama_arm64
CGO_ENABLED
=
1
GOARCH
=
arm64 go build
-o
dist/ollama_arm64
CGO_ENABLED
=
1
GOARCH
=
amd64 go build
-o
dist/ollama_amd64
CGO_ENABLED
=
1
GOARCH
=
amd64 go build
-o
dist/ollama_amd64
lipo
-create
-output
dist/ollama dist/ollama_arm64 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
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
scripts/publish.sh
View file @
ed832ce3
...
@@ -8,9 +8,8 @@ if [[ -z "${VERSION}" ]]; then
...
@@ -8,9 +8,8 @@ if [[ -z "${VERSION}" ]]; then
fi
fi
OS
=
$(
go
env
GOOS
)
OS
=
$(
go
env
GOOS
)
ARCH
=
$(
go
env
GOARCH
)
./script/build.sh
./script/build
_
${
OS
}
.sh
# Create a new tag if it doesn't exist.
# Create a new tag if it doesn't exist.
if
!
git rev-parse v
$VERSION
>
/dev/null 2>&1
;
then
if
!
git rev-parse v
$VERSION
>
/dev/null 2>&1
;
then
...
@@ -19,16 +18,8 @@ fi
...
@@ -19,16 +18,8 @@ fi
git push origin v
$VERSION
git push origin v
$VERSION
mkdir
-p
dist
cp
app/out/make/zip/
${
OS
}
/
${
ARCH
}
/Ollama-
${
OS
}
-
${
ARCH
}
-
${
VERSION
}
.zip dist/Ollama-
${
OS
}
-
${
ARCH
}
.zip
cp
./ollama dist/ollama-
${
OS
}
-
${
ARCH
}
# Create a new release.
# Create a new release.
gh release create
-p
v
$VERSION
-t
v
$VERSION
gh release create
-p
v
$VERSION
-t
v
$VERSION
# Upload the zip file.
# Upload the zip file.
gh release upload v
$VERSION
./dist/Ollama-
${
OS
}
-
${
ARCH
}
.zip
--clobber
gh release upload v
$VERSION
./dist/
*
--clobber
# Upload the binary.
gh release upload v
$VERSION
./dist/ollama-
${
OS
}
-
${
ARCH
}
--clobber
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment