crazywoola 8 miesięcy temu
rodzic
commit
c56de3966a
1 zmienionych plików z 26 dodań i 0 usunięć
  1. 26 0
      dify.rb.template

+ 26 - 0
dify.rb.template

@@ -0,0 +1,26 @@
+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