homebrew-core/Formula/paket.rb

51 lines
1.3 KiB
Ruby

class Paket < Formula
desc "Dependency manager for .NET with support for NuGet and Git repositories"
homepage "https://fsprojects.github.io/Paket/"
url "https://github.com/fsprojects/Paket/releases/download/6.1.3/paket.exe"
sha256 "ac491bf80be68de983c08291ab9e01e560dd788a020d36e1a2ea2aed082db5b0"
license "MIT"
bottle do
sha256 cellar: :any_skip_relocation, all: "71e8a09a3096c80c31040edd5aba638a816d215525089859d066f4ad645fb0b5"
end
depends_on arch: :x86_64 # mono is not yet supported on ARM
depends_on "mono"
def install
libexec.install "paket.exe"
(bin/"paket").write <<~EOS
#!/bin/bash
mono #{libexec}/paket.exe "$@"
EOS
end
test do
test_package_id = "Paket.Test"
test_package_version = "1.2.3"
touch testpath/"paket.dependencies"
touch testpath/"testfile.txt"
system bin/"paket", "install"
assert_predicate testpath/"paket.lock", :exist?
(testpath/"paket.template").write <<~EOS
type file
id #{test_package_id}
version #{test_package_version}
authors Test package author
description
Description of this test package
files
testfile.txt ==> lib
EOS
system bin/"paket", "pack", "output", testpath
assert_predicate testpath/"#{test_package_id}.#{test_package_version}.nupkg", :exist?
end
end