Closed johanhaleby closed 7 years ago
Great idea! Have never published on homebrew before so not sure how easy it is
It's easy to publish on homebrew, the "recipes" are simple scripts. But... the app needs to be self-contained. You can't have scripts that have to be called from certain directories, npm installs that need to be run, etc.
The 'self-contained' bit might be tricky. jvm-mon relies on a jdk being on the machine.
I tried it out locally, and this simple formula works: https://gist.github.com/03eea1303e5a9ff1a85dfffd96d4a674 (Download and copy to /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/jvm-mon.rb)
This is the file layout after install
/usr/local/Cellar$ tree -L 3 jvm-mon/
jvm-mon/
└── 0.2
├── INSTALL_RECEIPT.json
├── bin
│ └── jvm-mon -> ../libexec/bin/jvm-mon
└── libexec
├── bin
├── jvm-mon.js
├── lib
└── node_modules
As you see, we specify java 8 as a dependency, and the node deps do not install any moving parts, so should be safe. Anyway, it works :)
Submitted PR https://github.com/Homebrew/homebrew-core/pull/11661 Unfortunately automatic checks failed but not quite sure why. Works locally
Ok, the formula needs a test
It's been merged into homebrew! Thank you @janhoy!
brew install jvm-mon
Would be great if it would be possible to distribute it using homebrew