homebrew-core/Formula/nuget.rb

31 lines
952 B
Ruby

class Nuget < Formula
desc "Package manager for Microsoft development platform including .NET"
homepage "https://www.nuget.org/"
url "https://dist.nuget.org/win-x86-commandline/v6.0.0/nuget.exe" # make sure libexec.install below matches case
sha256 "04eb6c4fe4213907e2773e1be1bbbd730e9a655a3c9c58387ce8d4a714a5b9e1"
license "MIT"
livecheck do
url "https://dist.nuget.org/tools.json"
regex(%r{"url":\s*?"[^"]+/v?(\d+(?:\.\d+)+)/nuget\.exe",\s*?"stage":\s*?"ReleasedAndBlessed"}i)
end
bottle do
sha256 cellar: :any_skip_relocation, all: "e819eb531412fd5f4244df4d74b0d98c8ab70cc6a4c94ec0c729ab57675eccbc"
end
depends_on "mono"
def install
libexec.install "nuget.exe" => "nuget.exe"
(bin/"nuget").write <<~EOS
#!/bin/bash
mono #{libexec}/nuget.exe "$@"
EOS
end
test do
assert_match "NuGet.Protocol.Core.v3", shell_output("#{bin}/nuget list packageid:NuGet.Protocol.Core.v3")
end
end