diff --git a/dify.rb b/dify.rb index 2185c71..44fb08b 100644 --- a/dify.rb +++ b/dify.rb @@ -1,19 +1,22 @@ class Dify < Formula - desc "Dify Plugin Command Line Tool" + desc "Dify" homepage "https://github.com/langgenius/dify-plugin-daemon" - version "0.1.0" - license "MIT" + version "0.0.1-beta.19" if OS.mac? if Hardware::CPU.intel? - url "file://#{__dir__}/bin/dify-plugin-darwin-amd64.tar.gz" - sha256 "39ab1029634acf1caa8e68efcc393162a0fc760170472071b5fc02d06b084993" - else - url "file://#{__dir__}/bin/dify-plugin-darwin-arm64.tar.gz" - sha256 "467cd4d13a7be4d1583589da4cf6b39e3b72b2fe4a02b6bc59c2c36309459a4b" + url "https://github.com/langgenius/dify-plugin-daemon/releases/download/0.0.1-beta.19/dify-plugin-darwin-amd64" + elsif Hardware::CPU.arm? + url "https://github.com/langgenius/dify-plugin-daemon/releases/download/0.0.1-beta.19/dify-plugin-darwin-arm64" end - else - odie "This formula only supports macOS." + elsif OS.linux? + if Hardware::CPU.intel? + url "https://github.com/langgenius/dify-plugin-daemon/releases/download/0.0.1-beta.19/dify-plugin-linux-amd64" + elsif Hardware::CPU.arm? + url "https://github.com/langgenius/dify-plugin-daemon/releases/download/0.0.1-beta.19/dify-plugin-linux-arm64" + end + elsif OS.windows? + url "https://github.com/langgenius/dify-plugin-daemon/releases/download/0.0.1-beta.19/dify-plugin-windows-amd64" end def install diff --git a/dify.rb.template b/dify.rb.template deleted file mode 100644 index 6a429c1..0000000 --- a/dify.rb.template +++ /dev/null @@ -1,26 +0,0 @@ -class Dify < Formula - desc "Dify Plugin Command Line Tool" - homepage "https://github.com/langgenius/dify-plugin-daemon" - version "0.1.0" - license "MIT" - - if OS.mac? - if Hardware::CPU.intel? - url "file://#{__dir__}/bin/dify-plugin-darwin-amd64.tar.gz" - sha256 "PLACEHOLDER_FOR_AMD64_CHECKSUM" - else - url "file://#{__dir__}/bin/dify-plugin-darwin-arm64.tar.gz" - sha256 "PLACEHOLDER_FOR_ARM64_CHECKSUM" - end - else - odie "This formula only supports macOS." - end - - def install - bin.install "dify-plugin-darwin-#{Hardware::CPU.arch}" => "dify" - end - - test do - assert_match version.to_s, shell_output("#{bin}/dify --version") - end -end