-
-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# {{projectName}} Homebrew Tap | ||
|
||
## How do I install these formulae? | ||
|
||
`brew install ebullient/tap/{{projectName}}` | ||
|
||
Or `brew tap ebullient/tap` and then `brew install {{projectName}}`. | ||
|
||
## Homebrew Documentation | ||
|
||
`brew help`, `man brew` or check [Homebrew's documentation](https://docs.brew.sh). | ||
|
||
## TTRPG convert CLI Documentation | ||
|
||
`ttrpg-convert-cli --help` or check [TTRPG Convert CLI Documentation](https://github.com/ebullient/ttrpg-convert-cli/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# {{jreleaserCreationStamp}} | ||
class {{brewFormulaName}} < Formula | ||
desc "{{projectDescription}}" | ||
homepage "{{projectLinkHomepage}}" | ||
url "{{distributionUrl}}", :using => :nounzip | ||
version "{{projectVersion}}" | ||
sha256 "{{distributionChecksumSha256}}" | ||
license "{{projectLicense}}" | ||
|
||
{{#brewHasLivecheck}} | ||
livecheck do | ||
{{#brewLivecheck}} | ||
{{.}} | ||
{{/brewLivecheck}} | ||
end | ||
{{/brewHasLivecheck}} | ||
{{#brewDependencies}} | ||
depends_on {{.}} | ||
{{/brewDependencies}} | ||
|
||
def install | ||
libexec.install "{{distributionArtifactFile}}" | ||
|
||
bin.mkpath | ||
File.open("#{bin}/{{projectName}}", "w") do |f| | ||
f.write <<~EOS | ||
#!/bin/bash | ||
export JAVA_HOME="#{Language::Java.overridable_java_home_env(nil)[:JAVA_HOME]}" | ||
{{#distributionJavaMainModule}} | ||
exec "${JAVA_HOME}/bin/java" -p #{libexec}/{{distributionArtifactFile}} -m {{distributionJavaMainModule}}/{{distributionJavaMainClass}} "$@" | ||
{{/distributionJavaMainModule}} | ||
{{^distributionJavaMainModule}} | ||
exec "${JAVA_HOME}/bin/java" -jar #{libexec}/{{distributionArtifactFile}} "$@" | ||
{{/distributionJavaMainModule}} | ||
EOS | ||
end | ||
end | ||
|
||
test do | ||
output = shell_output("#{bin}/{{projectName}} --version") | ||
assert_match "{{projectVersion}}", output | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters