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
1358e27b
Commit
1358e27b
authored
Jul 07, 2023
by
Jeffrey Morgan
Browse files
add publish script
parent
7406881e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
15 deletions
+52
-15
Makefile
Makefile
+2
-1
docs/development.md
docs/development.md
+21
-14
scripts/publish.sh
scripts/publish.sh
+29
-0
No files found.
Makefile
View file @
1358e27b
...
@@ -11,7 +11,8 @@ ollama: llama
...
@@ -11,7 +11,8 @@ ollama: llama
.PHONY
:
app
.PHONY
:
app
app
:
ollama
app
:
ollama
npm run
--prefix
app make
npm
install
--prefix
app
npm run
--prefix
app make:sign
clean
:
clean
:
go clean
go clean
...
...
docs/development.md
View file @
1358e27b
# Development
# Development
ollama is built using Python 3 and uses
[
Poetry
](
https://python-poetry.org/
)
to manage dependencies and build packages.
Install required tools:
```
```
pip
install
poetry
brew
install
cmake go node
```
```
Install ollama and its dependencies
:
Then run
`make`
:
```
```
poetry install --extras server --with dev
make
```
```
R
un ollama
server
:
Now you can r
un
`
ollama
`
:
```
```
poetry run ollama server
./ollama
```
```
Update dependencies:
## Releasing
```
To release a new version of Ollama you'll need to set some environment variables:
poetry update --extras server --with dev
poetry lock
poetry export >requirements.txt
```
Build binary package:
*
`GITHUB_TOKEN`
: your GitHub token
*
`APPLE_IDENTITY`
: the Apple signing identity (macOS only)
*
`APPLE_ID`
: your Apple ID
*
`APPLE_PASSWORD`
: your Apple ID app-specific password
*
`APPLE_TEAM_ID`
: the Apple team ID for the signing identity
*
`TELEMETRY_WRITE_KEY`
: segment write key for telemetry
Then run the publish script with the target version:
```
```
poetry build
VERSION=0.0.2 ./scripts/publish.sh
```
```
scripts/publish.sh
0 → 100755
View file @
1358e27b
# Set your variables here.
REPO
=
"jmorganca/ollama"
# Check if VERSION is set
if
[[
-z
"
${
VERSION
}
"
]]
;
then
echo
"VERSION is not set. Please set the VERSION environment variable."
exit
1
fi
OS
=
$(
go
env
GOOS
)
ARCH
=
$(
go
env
GOARCH
)
make app
# Create a new tag if it doesn't exist.
if
!
git rev-parse v
$VERSION
>
/dev/null 2>&1
;
then
git tag v
$VERSION
git push origin v
$VERSION
fi
# Create a new release.
gh release create v
$VERSION
# Upload the zip file.
gh release upload v
$VERSION
"app/out/make/zip/
${
OS
}
/
${
ARCH
}
/Ollama-
${
OS
}
-
${
ARCH
}
-
${
VERSION
}
.zip#Ollama-
${
OS
}
-
${
ARCH
}
.zip"
# Upload the binary.
gh release upload v
$VERSION
"./ollama#ollama-
${
OS
}
-
${
ARCH
}
"
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