2014-08-24 19:08:42 +00:00
|
|
|
class Golo < Formula
|
2015-05-19 00:00:59 +00:00
|
|
|
desc "Lightweight dynamic language for the JVM"
|
2014-08-24 19:08:42 +00:00
|
|
|
homepage "http://golo-lang.org"
|
2015-07-27 23:22:18 +00:00
|
|
|
url "https://repo1.maven.org/maven2/org/golo-lang/golo/2.1.0/golo-2.1.0-distribution.tar.gz"
|
2015-07-27 08:31:37 +00:00
|
|
|
sha256 "59c7324b7eac88dfe2cb9612468cf5639ae0b84e44319b2ee617e0e054eed422"
|
|
|
|
|
|
|
|
devel do
|
2015-09-07 14:33:18 +00:00
|
|
|
url "https://www.eclipse.org/downloads/download.php?file=/golo/golo-3.0.0-incubation-M2.zip&r=1"
|
|
|
|
sha256 "d7e6aaca40a07cb8dc4574edf004199ea75543c5fa7888fe769969678fabdc58"
|
|
|
|
version "3.0.0-incubation-M2"
|
2015-07-27 08:31:37 +00:00
|
|
|
depends_on :java => "1.8+"
|
|
|
|
end
|
2014-08-24 19:08:42 +00:00
|
|
|
|
|
|
|
head do
|
2015-07-27 08:31:37 +00:00
|
|
|
url "https://github.com/eclipse/golo-lang.git"
|
|
|
|
depends_on :java => "1.8+"
|
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?
|
2015-09-07 14:33:18 +00:00
|
|
|
system "./gradlew", "installDist"
|
|
|
|
libexec.install %w[build/install/golo/bin build/install/golo/docs build/install/golo/lib]
|
|
|
|
elsif build.devel?
|
|
|
|
libexec.install %w[bin docs 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
|