Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for installing via brew #146

Open
niemyjski opened this issue Feb 7, 2019 · 14 comments
Open

Add support for installing via brew #146

niemyjski opened this issue Feb 7, 2019 · 14 comments
Labels

Comments

@niemyjski
Copy link

Would it be possible to add support for brew? It makes it much easier to install / maintain.

@maxandersen
Copy link
Contributor

if I knew how I would love to - want to contribute it ?

@michaelwoods
Copy link
Contributor

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.

@maxandersen
Copy link
Contributor

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 ;)

@michaelwoods
Copy link
Contributor

michaelwoods commented Feb 11, 2019

The formula is updated on each release, it's not an ideal flow/pipeline but it keeps things relatively stable.

Homebrew/homebrew-core#36915

@rccoleman
Copy link

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.

@maxandersen
Copy link
Contributor

@michaelwoods you up for this ?

@michaelwoods
Copy link
Contributor

Updated to 0.6.0 and I watched this repo for releases to help keep in sync.

Homebrew/homebrew-core#38419

@rccoleman
Copy link

Awesome, thanks!

@maxandersen
Copy link
Contributor

@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 ?

@maxandersen
Copy link
Contributor

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.

@michaelwoods
Copy link
Contributor

michaelwoods commented Jun 27, 2019

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.

@stale
Copy link

stale bot commented Aug 26, 2019

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.

@stale stale bot added the wontfix label Aug 26, 2019
@maxandersen
Copy link
Contributor

stupid @stalebot :) marking pinned so not having to battle it

@shaver
Copy link

shaver commented May 14, 2020

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants