development.md 691 Bytes
Newer Older
Bruce MacDonald's avatar
Bruce MacDonald committed
1
2
# Development

Jeffrey Morgan's avatar
Jeffrey Morgan committed
3
Install required tools:
Bruce MacDonald's avatar
Bruce MacDonald committed
4
5

```
Matt Williams's avatar
Matt Williams committed
6
brew install go
Bruce MacDonald's avatar
Bruce MacDonald committed
7
8
```

9
10
11
12
13
14
Enable CGO:

```
export CGO_ENABLED=1
```

Matt Williams's avatar
Matt Williams committed
15
Then build ollama:
Bruce MacDonald's avatar
Bruce MacDonald committed
16
17

```
Matt Williams's avatar
Matt Williams committed
18
go build .
Bruce MacDonald's avatar
Bruce MacDonald committed
19
20
```

Jeffrey Morgan's avatar
Jeffrey Morgan committed
21
Now you can run `ollama`:
Bruce MacDonald's avatar
Bruce MacDonald committed
22
23

```
Jeffrey Morgan's avatar
Jeffrey Morgan committed
24
./ollama
Bruce MacDonald's avatar
Bruce MacDonald committed
25
26
```

Jeffrey Morgan's avatar
Jeffrey Morgan committed
27
## Releasing
Bruce MacDonald's avatar
Bruce MacDonald committed
28

Jeffrey Morgan's avatar
Jeffrey Morgan committed
29
To release a new version of Ollama you'll need to set some environment variables:
Bruce MacDonald's avatar
Bruce MacDonald committed
30

Jeffrey Morgan's avatar
Jeffrey Morgan committed
31
32
33
34
35
36
37
38
* `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:
Bruce MacDonald's avatar
Bruce MacDonald committed
39
40

```
Jeffrey Morgan's avatar
Jeffrey Morgan committed
41
VERSION=0.0.2 ./scripts/publish.sh
Bruce MacDonald's avatar
Bruce MacDonald committed
42
```
Jeffrey Morgan's avatar
Jeffrey Morgan committed
43
44
45
46