META-INF.jreleaser.templates.java-binary.brew.formula.rb.tpl Maven / Gradle / Ivy
# {{jreleaserCreationStamp}}
{{#brewRequireRelative}}
require_relative "{{.}}"
{{/brewRequireRelative}}
class {{brewFormulaName}} < Formula
desc "{{projectDescription}}"
homepage "{{projectLinkHomepage}}"
url "{{distributionUrl}}"{{#brewDownloadStrategy}}, :using => {{.}}{{/brewDownloadStrategy}}
version "{{projectVersion}}"
sha256 "{{distributionChecksumSha256}}"
license "{{projectLicense}}"
{{#brewHasLivecheck}}
livecheck do
{{#brewLivecheck}}
{{.}}
{{/brewLivecheck}}
end
{{/brewHasLivecheck}}
{{#brewDependencies}}
depends_on {{.}}
{{/brewDependencies}}
def install
libexec.install Dir["*"]
bin.install_symlink "#{libexec}/bin/{{distributionExecutableUnix}}" => "{{distributionExecutableName}}"
end
test do
output = shell_output("#{bin}/{{distributionExecutableName}} --version")
assert_match "{{projectVersion}}", output
end
end