2014-08-24 19:08:42 +00:00
|
|
|
class Golo < Formula
|
|
|
|
homepage "http://golo-lang.org"
|
2015-01-20 19:15:05 +00:00
|
|
|
url "http://search.maven.org/remotecontent?filepath=org/golo-lang/golo/2.0.0/golo-2.0.0-distribution.tar.gz"
|
|
|
|
sha1 "8d9f8433518885b5d8aa0015b19c230fd425d3da"
|
2014-08-24 19:08:42 +00:00
|
|
|
|
|
|
|
head do
|
|
|
|
url "https://github.com/golo-lang/golo-lang.git"
|
2014-12-18 03:35:49 +00:00
|
|
|
depends_on "maven" => :build
|
2014-08-24 19:08:42 +00:00
|
|
|
end
|
|
|
|
|
2015-01-30 09:45:14 +00:00
|
|
|
depends_on :java => "1.7+"
|
2014-08-24 19:08:42 +00:00
|
|
|
|
|
|
|
def install
|
|
|
|
if build.head?
|
|
|
|
rake "special:bootstrap"
|
2015-01-30 09:45:14 +00:00
|
|
|
libexec.install %w[target/appassembler/bin target/appassembler/lib]
|
2014-08-24 19:08:42 +00:00
|
|
|
else
|
2015-01-30 09:45:14 +00:00
|
|
|
libexec.install %w[bin doc lib]
|
2014-08-24 19:08:42 +00:00
|
|
|
end
|
2015-01-30 09:45:14 +00:00
|
|
|
libexec.install %w[share samples]
|
2014-08-24 19:08:42 +00:00
|
|
|
|
|
|
|
rm_f Dir["#{libexec}/bin/*.bat"]
|
|
|
|
bin.install_symlink Dir["#{libexec}/bin/*"]
|
|
|
|
bash_completion.install "#{libexec}/share/shell-completion/golo-bash-completion"
|
|
|
|
zsh_completion.install "#{libexec}/share/shell-completion/golo-zsh-completion" => "_golo"
|
|
|
|
cp "#{bash_completion}/golo-bash-completion", zsh_completion
|
|
|
|
end
|
|
|
|
|
|
|
|
def caveats
|
2015-01-30 09:45:14 +00:00
|
|
|
if ENV["SHELL"].include? "zsh"
|
|
|
|
<<-EOS.undent
|
|
|
|
For ZSH users, please add "golo" in yours plugins in ".zshrc"
|
2014-08-24 19:08:42 +00:00
|
|
|
EOS
|
|
|
|
end
|
|
|
|
end
|
2015-01-30 09:45:14 +00:00
|
|
|
|
|
|
|
test do
|
|
|
|
system "#{bin}/golo", "golo", "--files", "#{libexec}/samples/helloworld.golo"
|
|
|
|
end
|
2014-08-24 19:08:42 +00:00
|
|
|
end
|