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.3.0/nuget.exe" # make sure libexec.install below matches case
sha256 "38257f945b3662f5c81d646f2cd940365642e2c4941b34c0e5ae3f4281f9bd2d"
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: "242d9d64ce650d7c6c5e5b388d0120bc7a77af990824844930328c10d0dec922"
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