31 lines
952 B
Ruby
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.2.1/nuget.exe" # make sure libexec.install below matches case
|
|
sha256 "a79f342e739fdb3903a92218767e7813e04930dff463621b6d2be2d468b84e05"
|
|
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: "26a102331db48c2af8c7d760ab3eed8cdf7a97e2b8f0c96a2d5f43762e1bb97d"
|
|
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
|