2016-07-18 17:57:52 +00:00
|
|
|
class Paket < Formula
|
|
|
|
desc "Dependency manager for .NET with support for NuGet and Git repositories"
|
|
|
|
homepage "https://fsprojects.github.io/Paket/"
|
2016-10-29 11:56:28 +00:00
|
|
|
url "https://github.com/fsprojects/Paket/releases/download/3.25.2/paket.exe"
|
|
|
|
sha256 "5b5b9fdaa7d1c95061b1a7425ed9d00bb6381f35633afd4c26c4077b36ac72ab"
|
2016-07-18 17:57:52 +00:00
|
|
|
|
|
|
|
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
|