homebrew-core/Formula/cake.rb
Redth 5d770bea85 cake 0.5.1 (new formula)
This adds a new formula for cake (C# Make).

Tests are included which builds a simple script to run and check the output of.

Closes Homebrew/homebrew#42184.

Signed-off-by: Dominyk Tiller <dominyktiller@gmail.com>
2015-07-30 06:30:34 +01:00

38 lines
910 B
Ruby

class Cake < Formula
desc "Cake (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.5.1/Cake-bin-v0.5.1.zip"
sha256 "ff431d845575b0be9e355caa9f44a82ea015d8b849eeafcdaee0904c3fb6da53"
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