homebrew-core/Formula/cake.rb
2017-03-24 07:21:51 +01:00

36 lines
900 B
Ruby

class Cake < Formula
desc "Cross platform build automation system with a C# DSL."
homepage "http://cakebuild.net/"
url "https://github.com/cake-build/cake/releases/download/v0.19.1/Cake-bin-net45-v0.19.1.zip"
sha256 "04b354155d0b95d4bf0c7a53d3d330692bbdbbcbd0e7a5e82d9fbdae9c9a1a20"
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
(testpath/"build.cake").write <<-EOS.undent
var target = Argument ("target", "info");
Task("info").Does(() =>
{
Information ("Hello Homebrew");
});
RunTarget ("info");
EOS
assert_match "Hello Homebrew\n", shell_output("#{bin}/cake build.cake")
end
end