Skip to content

Commit 0e5aca2

Browse files
authored
Merge pull request #227464 from Homebrew/bump-localai-3.0.0
go-rice 1.0.3 (new formula) localai 3.0.0
2 parents cf3fd1c + f110112 commit 0e5aca2

File tree

2 files changed

+71
-10
lines changed

2 files changed

+71
-10
lines changed

Formula/g/go-rice.rb

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
class GoRice < Formula
2+
desc "Easily embed resources like HTML, JS, CSS, images, and templates in Go"
3+
homepage "https://github.com/GeertJohan/go.rice"
4+
url "https://github.com/GeertJohan/go.rice/archive/refs/tags/v1.0.3.tar.gz"
5+
sha256 "dda8be9c9c594e164e664479001e7113d0f6571b3fc93253ef132096540f0673"
6+
license "BSD-2-Clause"
7+
head "https://github.com/GeertJohan/go.rice.git", branch: "master"
8+
9+
bottle do
10+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "d46108d4a8f53e1f8e3d4837ca941af6f3c866b247ff7c58d3bf8b65d34c43fd"
11+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "d46108d4a8f53e1f8e3d4837ca941af6f3c866b247ff7c58d3bf8b65d34c43fd"
12+
sha256 cellar: :any_skip_relocation, arm64_ventura: "d46108d4a8f53e1f8e3d4837ca941af6f3c866b247ff7c58d3bf8b65d34c43fd"
13+
sha256 cellar: :any_skip_relocation, sonoma: "52269f53fda001ba801a35a19c774755f8b183f3bf9d99474d852945b915e1dd"
14+
sha256 cellar: :any_skip_relocation, ventura: "52269f53fda001ba801a35a19c774755f8b183f3bf9d99474d852945b915e1dd"
15+
sha256 cellar: :any_skip_relocation, x86_64_linux: "acfb2a6c644ea76394bae1d3cb7607ad96ba33c478a0864e844373738d36c27a"
16+
end
17+
18+
depends_on "go" => [:build, :test]
19+
20+
def install
21+
ldflags = "-s -w -X main.BuildVersion=#{version}"
22+
system "go", "build", *std_go_args(ldflags:, output: bin/"rice"), "./rice"
23+
end
24+
25+
test do
26+
(testpath/"testproject").mkpath
27+
cd "testproject" do
28+
(testpath/"testproject/main.go").write <<~EOS
29+
package main
30+
31+
import (
32+
"fmt"
33+
rice "github.com/GeertJohan/go.rice"
34+
)
35+
36+
func main() {
37+
box := rice.MustFindBox("templates")
38+
str, err := box.String("test.txt")
39+
if err != nil {
40+
panic(err)
41+
}
42+
fmt.Print(str)
43+
}
44+
EOS
45+
46+
(testpath/"testproject/templates").mkpath
47+
(testpath/"testproject/templates/test.txt").write "Hello, rice!"
48+
49+
# Initialize go module and get go.rice dependency
50+
system "go", "mod", "init", "testproject"
51+
system "go", "mod", "tidy"
52+
53+
# Use go-rice to embed the resources
54+
system bin/"rice", "embed-go"
55+
56+
system "go", "build", "-o", "testbin"
57+
assert_match "Hello, rice!", shell_output("./testbin")
58+
end
59+
end
60+
end

Formula/l/localai.rb

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,33 @@ class Localai < Formula
33

44
desc "OpenAI alternative"
55
homepage "https://localai.io"
6-
url "https://github.com/mudler/LocalAI/archive/refs/tags/v2.28.0.tar.gz"
7-
sha256 "b75f7cffb3b105c1f5e7cd4aa2d5c18cf461b6af0977d150d654d596f1dc8d79"
6+
url "https://github.com/mudler/LocalAI/archive/refs/tags/v3.0.0.tar.gz"
7+
sha256 "dfe1cc4fee4f7116b2a40300e2c3b31c0244a91ef42b8af625bcc79b49f59172"
88
license "MIT"
99
head "https://github.com/mudler/LocalAI.git", branch: "master"
1010

1111
bottle do
12-
sha256 cellar: :any_skip_relocation, arm64_sequoia: "b50f832facfac7f166ca59de5d3b7f241b10bcfe0dcdee6afec90b3d557e1812"
13-
sha256 cellar: :any_skip_relocation, arm64_sonoma: "2c82bb99e40beb0bb781ecf1087d0a0c3deeca7f2423d177c831e5ee639db516"
14-
sha256 cellar: :any_skip_relocation, arm64_ventura: "27a1f5a845087a4604800f0eee1642747f95f68a4f9eb268f6180aba2cbd4638"
15-
sha256 cellar: :any_skip_relocation, sonoma: "dc8a9eb26fe99a47a098f82f050302a548f6f529b86c14f1b90f5f602e204b07"
16-
sha256 cellar: :any_skip_relocation, ventura: "71df6ef43bb378c2fac806673579b47e5a717e0805a17227fd9ddea6b0070043"
17-
sha256 x86_64_linux: "3a36fc178cc6108855d3f75d2c7751d616e9a176901ecc5dc6dca9e2ff5e134e"
12+
sha256 cellar: :any_skip_relocation, arm64_sequoia: "6736e4c9ea160f01e9f679af47c5ae8ccd6e62e5f859c13eec7a7b814d673cdf"
13+
sha256 cellar: :any_skip_relocation, arm64_sonoma: "78c6b420b7774f0e4db13875b6aea4a5519357b26a01898d9d5075ec7bc6ea91"
14+
sha256 cellar: :any_skip_relocation, arm64_ventura: "ca3d05f93c9e606deaffa442e150667a49e61d3a2b38a8ed94de0498fef49e31"
15+
sha256 cellar: :any_skip_relocation, sonoma: "99332128a15f4db598d4b033474e2769372a43994642e544a6d54d98a5c56954"
16+
sha256 cellar: :any_skip_relocation, ventura: "c8c2a8e818e588846300a67d8bae0dcfaa17b74d79a204bbb7de2aeb43989c6e"
17+
sha256 x86_64_linux: "22e4e42166bb2917c51aff02646633b5c59d61227b7e47bc115b947f4064dd24"
1818
end
1919

2020
depends_on "abseil" => :build
2121
depends_on "cmake" => :build
2222
depends_on "go" => :build
23+
depends_on "go-rice" => :build
2324
depends_on "grpc" => :build
2425
depends_on "protobuf" => :build
2526
depends_on "protoc-gen-go" => :build
2627
depends_on "protoc-gen-go-grpc" => :build
2728
depends_on "python@3.13" => :build
2829

2930
resource "grpcio-tools" do
30-
url "https://files.pythonhosted.org/packages/05/d2/c0866a48c355a6a4daa1f7e27e210c7fa561b1f3b7c0bce2671e89cfa31e/grpcio_tools-1.71.0.tar.gz"
31-
sha256 "38dba8e0d5e0fb23a034e09644fdc6ed862be2371887eee54901999e8f6792a8"
31+
url "https://files.pythonhosted.org/packages/0b/62/5f7d3a6d394a7d0cf94abaa93e8224b7cdbc0677bdf2caabd20a62d4f5cb/grpcio_tools-1.73.0.tar.gz"
32+
sha256 "69e2da77e7d52c7ea3e60047ba7d704d242b55c6c0ffb1a6147ace1b37ce881b"
3233
end
3334

3435
def python3

0 commit comments

Comments
 (0)