home-assistant-cli
home-assistant-cli copied to clipboard
Add support for installing via brew
Would it be possible to add support for brew? It makes it much easier to install / maintain.
if I knew how I would love to - want to contribute it ?
I have a formula locally installed for brew. I will open a PR to add this into homebrew and one here for README instructions later this evening.
cool @michaelwoods! does that formula just take the latest version and its dependencies available in pip or do we need to somehow update it on each release ? (wonder how other packages deal with that fun ;)
The formula is updated on each release, it's not an ideal flow/pipeline but it keeps things relatively stable.
https://github.com/Homebrew/homebrew-core/pull/36915
While hass-cli is available from Homebrew and works, it's currently pulling v0.5.0. That's missing the "state" command (at least) and some of the examples in the README fail. I switched to the pip3 installation method and got v0.6.0, which does have the missing command. The formula needs to be updated again.
@michaelwoods you up for this ?
Updated to 0.6.0 and I watched this repo for releases to help keep in sync.
https://github.com/Homebrew/homebrew-core/pull/38419
Awesome, thanks!
@michaelwoods 0.7.0 was released 10 days ago - I reckon you missed the notification. I've now automated releases of the cli to pypi so we'll hopefully see faster releases - if for nothing else to keep the dependencies matching homeassistant it self.
is there not any way we can automate the release to brew ?
I've seen things like https://github.com/sloria/doitlive/blob/dev/release_homebrew.sh that might be useful for at least semi-automate the releases...but I have no idea how that will handle dependency updates.
Automating would be great. Perhaps a Travis CI OSX instance (comes with homebrew already!) would work well. The process for updating is below, however I'm not sure if the manual merge step can be completed without a little scripting. The tools that I'm aware of unfortunately don't edit/update the formulas and only output blocks of text.
export PACKAGE=homeassistant-cli
export VERSION=0.7.0
pip install -U $PACKAGE
poet -f $PACKAGE > formula.new
brew edit $PACKAGE ### merge the changes from new to old file
brew upgrade $PACKAGE
brew test $PACKAGE
brew audit --strict --online $PACKAGE
cd $(dirname $(brew formula $PACKAGE))
git add ${PACKAGE}.rb
git commit -m "$PACKAGE $VERSION"
git push -f REMOTE_FORK master ### and then PR to Homebrew/homebrew-core
At the very least I suppose the build job's output could just be the new formulate template. brew bump-formula-pr
may be an option, however it seems to want to send it right to github without being able to modify the resources section before that.
https://github.com/tdsmith/homebrew-pypi-poet https://docs.travis-ci.com/user/reference/osx/#using-macos
I've submitted the update PR to 0.7.0 to homebrew.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
stupid @stalebot :) marking pinned so not having to battle it
FWIW, I just put up a PR for the upgrade to 0.9.1 with this command, after setting my github token so it could create the repos and PR as me:
brew bump-formula-pr --url https://files.pythonhosted.org/packages/ea/14/3e1f0327335a2a50409efbcdd35f4eea2961308a735bb1b1dd5b70ff6cec/homeassistant-cli-0.9.1.tar.gz homeassistant-cli
Just mentioning that here in case it helps with the automation!