jotaen / klog

Command line tool for time tracking in a human-readable, plain-text file format.
https://klog.jotaen.net
MIT License
551 stars 28 forks source link

Add to Homebrew #1

Closed MarcMogdanz closed 2 years ago

MarcMogdanz commented 3 years ago

It would be nice to install klog via Homebrew so I don't have to worry about installing/updating

I already love it, it's better than my current setup which is in a similar format but on paper :^)

jotaen commented 3 years ago

Better distribution is high up on the todo list, Homebrew will come soon!

jotaen commented 3 years ago

Until homebrew & co is ready to go, I just added a “version” subcommand, so that you can conveniently check for updates from within the tool via klog version.

That’s still a manual check of course, but it’s hopefully a bit more convenient than having to visit Github.

jotaen commented 3 years ago

So, I have setup something. It’s not (!) tested though, so I have no idea whether it works or not. (I don’t use Homebrew myself and don’t want to install it.)

Would appreciate if someone could try it out and/or give me tips how to improve the formula. Also unsure how Homebrew deals with Gatekeeper, since the binary isn’t signed.

MarcMogdanz commented 3 years ago

I can't really give you tips for your formula but I've tried installing it and got an error.

I added your repo as a tap:

➜  ~ brew tap jotaen/homebrew-klog
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from c538d4d84 to f416f8b54.
Updated 4 taps (hashicorp/tap, homebrew/core, homebrew/cask and homebrew/cask-drivers).
==> New Formulae
coin3d          curlie          dasel           ht-rust         libprelude
==> Updated Formulae
Updated 4966 formulae.
==> New Casks
1kc-razer           gather              pathephone          zy-player
deskreen            hhkb-keymap-tool    vofa-plus
==> Updated Casks
Updated 185 casks.

==> Homebrew was updated to version 3.0.0
More detailed release notes are available on the Homebrew Blog:
  https://brew.sh/blog/3.0.0
==> Tapping jotaen/klog
Cloning into '/usr/local/Homebrew/Library/Taps/jotaen/homebrew-klog'...
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 8 (delta 0), reused 8 (delta 0), pack-reused 0
Receiving objects: 100% (8/8), done.
Tapped 1 formula (29 files, 31.3KB).

And then tried to install it normally like every other package:

➜  ~ brew install klog
==> Installing klog from jotaen/klog
==> Downloading https://github.com/jotaen/klog/releases/download/v1.0/klog-mac.z
==> Downloading from https://github-releases.githubusercontent.com/318172685/e79
######################################################################## 100.0%
Warning: Your Xcode (12.3) is outdated.
Please update to Xcode 12.4 (or delete it).
Xcode can be updated from the App Store.

Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
  softwareupdate --all --install --force

If that doesn't show you any updates, run:
  sudo rm -rf /Library/Developer/CommandLineTools
  sudo xcode-select --install

Alternatively, manually download them from:
  https://developer.apple.com/download/more/.

Error: Empty installation
jpoehls commented 3 years ago

If you haven't already, I'd recommend looking into https://goreleaser.com/. I've not used it personally, but I've seen it used by other popular Go projects and it looks very helpful in this area.

jotaen commented 3 years ago

@jpoehls ah good hint, thanks! I have heard of it but also didn’t look into it yet.

vladdeSV commented 2 years ago

Just wanted to mention that the (almost) latest release of klog (v3.0) works with brew really well on macOS. I just ran brew tap jotaen/klog and it works perfectly.

Could I ask you @jotaen to update the homebrew version to v3.1?

jotaen commented 2 years ago

Ah terrific – I pushed a fix recently but wasn’t able to verify yet that it all works. So thanks for testing 🎉

I have updated the tap with the latest release. (Note to self: automate this process.)