8cb5b5ed8b
Closes #35866. Signed-off-by: Chongyu Zhu <i@lembacon.com>
38 lines
948 B
Ruby
38 lines
948 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.32.1/Cake-bin-net461-v0.32.1.zip"
|
|
sha256 "fa98c3e22876e30e13df2081c02b5d03686d59a8cea5d28f050de86e7b6f6233"
|
|
|
|
bottle :unneeded
|
|
|
|
depends_on "mono"
|
|
|
|
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
|