2015-07-28 00:27:53 +00:00
|
|
|
class Cake < Formula
|
|
|
|
desc "Cake (C# Make) is a build automation system with a C# DSL."
|
|
|
|
homepage "http://cakebuild.net/"
|
2015-09-12 11:55:14 +00:00
|
|
|
url "https://github.com/cake-build/cake/releases/download/v0.5.4/Cake-bin-v0.5.4.zip"
|
|
|
|
sha256 "b8839f99a5c5fdb41dd963d5c105788627fade5846a7d3abc568ed7f05efd7aa"
|
2015-07-28 00:27:53 +00:00
|
|
|
|
|
|
|
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
|