homebrew-core/Formula/paket.rb
2017-09-20 09:05:14 -07:00

46 lines
1.1 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/5.97.1/paket.exe"
sha256 "a7fb74af61b1a41894efc131c4c4712a6ac3512e39035be3917781b77e12abcc"
bottle :unneeded
depends_on "mono" => :recommended
def install
libexec.install "paket.exe"
(bin/"paket").write <<-EOS.undent
#!/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 (testpath/"paket.lock").exist?
(testpath/"paket.template").write <<-EOS.undent
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 (testpath/"#{test_package_id}.#{test_package_version}.nupkg").exist?
end
end