homebrew-core/Formula/cake.rb

41 lines
927 B
Ruby
Raw Normal View History

class Cake < Formula
2015-12-19 06:29:01 +00:00
desc "'C# Make' is a build automation system with a C# DSL."
homepage "http://cakebuild.net/"
2016-05-25 20:37:51 +00:00
url "https://github.com/cake-build/cake/releases/download/v0.12.0/Cake-bin-v0.12.0.zip"
sha256 "cb136091a98f8b50c7020c9f1250549bcac8c5579393350d79f29674729d8000"
2015-10-22 13:10:03 +00:00
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