dify.rb 745 B

123456789101112131415161718192021222324252627
  1. class Dify < Formula
  2. desc "Dify Plugin Command Line Tool"
  3. homepage "https://github.com/langgenius/dify-plugin-daemon"
  4. version "0.1.0"
  5. license "MIT"
  6. if OS.mac?
  7. if Hardware::CPU.intel?
  8. url "file://#{__dir__}/bin/dify-plugin-darwin-amd64.tar.gz"
  9. sha256 "e57c3b3adab56e43f588b5add4e95d4449d916f7ef2e09d6ff4ab760e22e7bd8"
  10. else
  11. url "file://#{__dir__}/bin/dify-plugin-darwin-arm64.tar.gz"
  12. sha256 "5a60e8a6faa43dc3241ca74856a95710d695f164d5e845bb71471b8db7ce50e7"
  13. end
  14. else
  15. odie "This formula only supports macOS."
  16. end
  17. def install
  18. bin.install "dify-plugin-darwin-#{Hardware::CPU.arch}" => "dify"
  19. end
  20. test do
  21. assert_match version.to_s, shell_output("#{bin}/dify --version")
  22. end
  23. end