dify.rb 1.1 KB

123456789101112131415161718192021222324252627282930
  1. class Dify < Formula
  2. desc "Dify"
  3. homepage "https://github.com/langgenius/dify-plugin-daemon"
  4. version "0.0.1-beta.21"
  5. if OS.mac?
  6. if Hardware::CPU.intel?
  7. url "https://github.com/langgenius/dify-plugin-daemon/releases/download/0.0.1-beta.21/dify-plugin-darwin-amd64"
  8. elsif Hardware::CPU.arm?
  9. url "https://github.com/langgenius/dify-plugin-daemon/releases/download/0.0.1-beta.21/dify-plugin-darwin-arm64"
  10. end
  11. elsif OS.linux?
  12. if Hardware::CPU.intel?
  13. url "https://github.com/langgenius/dify-plugin-daemon/releases/download/0.0.1-beta.21/dify-plugin-linux-amd64"
  14. elsif Hardware::CPU.arm?
  15. url "https://github.com/langgenius/dify-plugin-ddify aemon/releases/download/0.0.1-beta.21/dify-plugin-linux-arm64"
  16. end
  17. elsif OS.windows?
  18. url "https://github.com/langgenius/dify-plugin-daemon/releases/download/0.0.1-beta.21/dify-plugin-windows-amd64"
  19. end
  20. def install
  21. bin.install "dify-plugin-darwin-#{Hardware::CPU.arch}" => "dify"
  22. end
  23. test do
  24. assert_match version.to_s, shell_output("#{bin}/dify --version")
  25. end
  26. end