41 lines
927 B
Ruby
41 lines
927 B
Ruby
class Cake < Formula
|
|
desc "'C# Make' is a build automation system with a C# DSL."
|
|
homepage "http://cakebuild.net/"
|
|
url "https://github.com/cake-build/cake/releases/download/v0.10.0/Cake-bin-v0.10.0.zip"
|
|
sha256 "babb990377dd759ea1f84c1f58150ebbec1f2d3585e52ad2df6ed175c0d4b17b"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on "mono" => :recommended
|
|
|
|
def install
|
|
libexec.install Dir["*.dll"]
|
|
libexec.install Dir["*.exe"]
|
|
libexec.install Dir["*.xml"]
|
|
|
|
bin.mkpath
|
|
(bin/"cake").write <<-EOS.undent
|
|
#!/bin/bash
|
|
mono #{libexec}/Cake.exe "$@"
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
test_str = "Hello Homebrew"
|
|
(testpath/"build.cake").write <<-EOS.undent
|
|
|
|
var target = Argument ("target", "info");
|
|
|
|
Task("info").Does(() =>
|
|
{
|
|
Information ("Hello Homebrew");
|
|
});
|
|
|
|
RunTarget ("info");
|
|
|
|
EOS
|
|
|
|
assert_match test_str, shell_output("#{bin}/cake ./build.cake").strip
|
|
end
|
|
end
|