homebrew-core/Formula/cake.rb
2017-12-29 13:59:51 -08:00

38 lines
964 B
Ruby

class Cake < Formula
desc "Cross platform build automation system with a C# DSL"
homepage "https://cakebuild.net/"
url "https://github.com/cake-build/cake/releases/download/v0.24.0/Cake-bin-net461-v0.24.0.zip"
sha256 "2f03215fd30a7c77650a4a8827af6d2c30df3416de61ab72c4ccb85cc8bd7e02"
bottle :unneeded
depends_on "mono" => :recommended
conflicts_with "coffeescript", :because => "both install `cake` binaries"
def install
libexec.install Dir["*.dll"]
libexec.install Dir["*.exe"]
libexec.install Dir["*.xml"]
bin.mkpath
(bin/"cake").write <<~EOS
#!/bin/bash
mono #{libexec}/Cake.exe "$@"
EOS
end
test do
(testpath/"build.cake").write <<~EOS
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