Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add homebrew formula for published testing binaries #4

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions Formula/ollama-elastic.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
class OllamaElastic < Formula
desc ""
homepage ""
version "dbeaea4"

on_macos do
url "https://github.com/elastic/ollama/releases/download/dbeaea4/ollama-darwin"
sha256 "df241ff0b7f0f4ed3be36e2f9322848bd6b2a4dec205a84e0b104272a6393ffe"
def install
bin.install "ollama-darwin" => "ollama-elastic"
end
end

on_linux do
on_intel do
if Hardware::CPU.is_64_bit?
url "https://github.com/elastic/ollama/releases/download/dbeaea4/ollama-linux-amd64.tgz"
sha256 "fa8429dccf0f484aab143e934cc3fa2ffb2d07519c62b380d3554d12ed5af6ec"

def install
bin.install "bin/ollama" => "ollama-elastic"
end
end
end
on_arm do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a little confused per "homebrew doesn't seem to support linux/arm64." should we still build?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figured it doesn't hurt to keep it here in case brew adds support out of band later. If it's confusing, can remove it. The build won't be faster unfortunately since it's the Darwin artifact that takes quite a while.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

makes sense

if Hardware::CPU.is_64_bit?
url "https://github.com/elastic/ollama/releases/download/dbeaea4/ollama-linux-arm64.tgz"
sha256 "fc49eeeba27db672b1d56d91ccbe4f6ef853bc49162275d98f173e78ef1b1c48"

def install
bin.install "bin/ollama" => "ollama-elastic"
end
end
end
end
end