From 92884c65d1f89a5d215cd53a12cadca6c3616ef5 Mon Sep 17 00:00:00 2001 From: Mrered Cio <34948506+Mrered@users.noreply.github.com> Date: Tue, 28 Jan 2025 03:30:50 +0800 Subject: [PATCH] ollamaplist: 0.2.2 --- Formula/ollamaplist.rb | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/Formula/ollamaplist.rb b/Formula/ollamaplist.rb index a5fecfc..9c1c59a 100644 --- a/Formula/ollamaplist.rb +++ b/Formula/ollamaplist.rb @@ -1,24 +1,25 @@ class Ollamaplist < Formula desc "给 Ollama CLI 添加环境变量" homepage "https://github.com/Mrered/Gobin" - url "https://mirror.ghproxy.com/https://github.com/Mrered/Gobin/releases/download/v0.2.2/ollamaplist_0.2.2_darwin_arm64.tar.gz", - verified: "mirror.ghproxy.com/" - sha256 "9ffa61dfdc430d21c7e675205a3a73768f9a063065e8b8f9a55b3b3b71d24ebf" + version "0.2.2" license "MIT" + mirror = "https://mirror.ghproxy.com/" + if OS.mac? && Hardware::CPU.arm? + url "#{mirror}https://github.com/Mrered/Gobin/releases/download/v#{version}/ollamaplist_#{version}_darwin_arm64.tar.gz", + verified: "mirror.ghproxy.com/" + sha256 "9ffa61dfdc430d21c7e675205a3a73768f9a063065e8b8f9a55b3b3b71d24ebf" + elsif OS.mac? && !Hardware::CPU.arm? + url "#{mirror}https://github.com/Mrered/Gobin/releases/download/v#{version}/ollamaplist_#{version}_darwin_amd64.tar.gz", + verified: "mirror.ghproxy.com/" + sha256 "d311991876899604b5000730e21f0c17c38d34fef4a5d2e6f00ade044250d008" + end + livecheck do url :homepage strategy :github_latest end - on_macos do - on_intel do - url "https://mirror.ghproxy.com/https://github.com/Mrered/Gobin/releases/download/v0.2.2/ollamaplist_0.2.2_darwin_amd64.tar.gz", - verified: "mirror.ghproxy.com/" - sha256 "d311991876899604b5000730e21f0c17c38d34fef4a5d2e6f00ade044250d008" - end - end - def install bin.install "ollamaplist" end