RhetTbull / macnotesapp

Work with Apple MacOS Notes.app from the command line. Also includes python interface for scripting Notes.app from your own python code.
MIT License
141 stars 6 forks source link

Proposal: Add a home-brew tap to allow installing macnotesapp #49

Closed brianm closed 2 months ago

brianm commented 2 months ago

Given that notes works well as a command line tool, the redirect through pipx to install the end application on macOS would be nice to avoid. I'd like to propose hosting an in-repo home-brew tap with a formula for the most recent release. Basically, add a homebrew directory with a notes.rb formula in it, allowing users to brew tap https://github.com/RhetTbull/macnotesapp/homebrew && brew update && brew install notes and then get updates via normal brew update.

Happy to implement this myself, but wanted to ask about interest before I do!

brianm commented 2 months ago

Actually, I'll need to verify that subdirectory based taps work, but I think they do :-) If not, I don't want to impose keeping a different project in sync.

RhetTbull commented 2 months ago

Good idea. Happy to merge a PR but I don't know how to do this myself and don't have time to learn at the moment.

brianm commented 2 months ago

Started a PR for this. Question -- how do you make a release? I am guessing create tag and then run build.sh with the tag checked out?

To use same-repo tap, the convention will need to me that the formula in main is the most recent stable release. In order to make that happen as easily reliably as possible, I am not sure the best way to fit it into your workflow!

RhetTbull commented 2 months ago

I use bump2version to bump the version, run build.sh, merge & push the changes, then use the GitHub command line client to create the relesae (gh release create VERSION). It's not very automated but I don't release often. So if you need the .rb script to be updated I would do it in build.sh so it's included in the release. See RELEASE_DEV.md which has my "developer notes to myself" on the build process.

brianm commented 2 months ago

Perfect, thanks!

RhetTbull commented 2 months ago

Merged! Thanks for implementing this. On my system the startup time for the CLI seems to be much slower than the via pipx but brew install may be preferable for many users.

brianm commented 2 months ago

I'm happy to switch it over to normal python script -- maybe for the next release :-)

There is a bit of a chicken and egg issue given your existing workflow, where the brew helper to include all the dependencies the way homebrew likes to requires that the release bundle be published already. There is probably a way around it, I just got lazy and used the binary rather than find it!