DomT4 / homebrew-autoupdate

:tropical_drink: An easy, convenient way to automatically update Homebrew.
BSD 2-Clause "Simplified" License
968 stars 54 forks source link

`brew autoupdate version` returns stale data #130

Open zmilonas opened 5 months ago

zmilonas commented 5 months ago

Hey,

awesome extension! I noticed that the version subcommand is returning stale data. On the latest commit on the master HEAD i still get commits made in 2022:

> brew autoupdate version
Version 2.16.0. Last Changed: March 2022

Changes since last version:

016cc06 version: bump to 2.16.0
2574d23 start: warn of terminal-notifier support deprecation
f8c3ba6 autoupdate: make Cask --greedy upgrade opt-in, not default behaviour (#81)
dfb2bdc autoupdate: clarify default-on notifications (#80)
7514191 triage-issues.yml: update to match main configuration
8c7a88d triage-issues.yml: update to match main configuration
a661d08 Fix brew style.
b5fdbda workflows/tests: use shorter name
74ffb57 triage-issues.yml: update to match main configuration

Solution

It seems that at some point the release notes mechanism was abandoned and the "Last Changed" has remained hardcoded in lib/autoupdate/version.rb:

https://github.com/Homebrew/homebrew-autoupdate/blob/master/lib/autoupdate/version.rb#L34-L36

We should probably change the grep and maybe drop the version information since there doesn't seem to be a version published anymore :)

Why it might be a problem?

I was very confused since I tried to update the "autoupdate" command and version was returning the 2022 date constantly, only after I manually checked my git log was I assured that it actually updated.

swissbuechi commented 5 months ago

Thank you for this issue. This annoys me as well. I think the real solution of this problem would be to define a workflow for merging pull requests.

The last time I developed a new feature, my PR just got merged, without any questions or hints from the maintainers regarding version increase and commit message.

Maybe something like a contribution.md with a predefined, step-by-step explanation and checklist?

DomT4 commented 5 months ago

This has been updated:

Version 3.0.1. Last Changed: Feb 2024

Changes since last version:

436d5d8 version: bump to 3.0.1
b131707 version: update to reflect significant changes
1696a43 applet: update plist
1eafd4b notifier: update applet
261f6c9 Reordered notifier message components
e8483e8 sudo_gui_script_contents:
55f5e1d sudo_gui_script_contents: add a timeout to pinentry-mac
77e122b Update README.md
3a5717c autoupdate: fix style with newer RuboCop
39a1571 status: rename method that's not actually a predicate
3cb5564 triage-issues.yml: update to match main configuration
5c3470f triage-issues.yml: update to match main configuration
f9a2d08 Fixed spelling mistakes
8bae445 Add missing space to `--sudo` switch description
4832569 Removed outdated comment
601148b brew style suggestion implemented
c1faa21 Removed embedded --help output Fixed some small spelling mistakes
3bab7e5 Only create brew_autoupdate_sudo_gui script if --sudo is passed
59edcb0 Fixed typo in sudo hint message
a927752 Updated SUDO_ASKPASS hint to user
12e6bd7 fix "Prefer string interpolation to string concatenation"
71269cf Change update message to respect --immediate argument
beccd5f renamed "reboot" to "on system boot"
83b26e9 Added check for pinentry-mac
41de0fa Added hint: pinentry-mac is required for --sudo
2d04cec Updated description of --sudo argument
6da1876 Convert if nested inside else to elsif
ee37278 Fixed indent
2a1fa8d Fixed space in path to script
0d0187e fix typo in export
712d8f5 Moved getpass.sh script to inline
399cff1 fixed trailing whitespace
4697e28 Updated description of --immediate
cd3d45b Added --sudo argument to start command
341288e added getpass.sh script
44e1844 Fix Style/InvertibleUnlessCondition violation
7812faa notifier: use tighter match to provide output
c31dc9b notifier: use system tail explicitly
3a2fb9f triage-issues.yml: update to match main configuration
5d2d879 triage-issues.yml: update to match main configuration
1f75d75 cmd/autoupdate: tweak help docs.
28f71fd triage-issues.yml: update to match main configuration
87a2b94 triage-issues.yml: update to match main configuration
54c9644 triage-issues.yml: update to match main configuration
4aa26fd autoupdate: Fix `greedy` docs
2761e38 start: start phasing out `--enable-notification` on 10.15+

I do apologise that this tap has various amounts of love poured into it at wildly different times. I sort of consider the tap close to feature complete, and consequently have skimmed down the amount of things I want to expand the tap into doing, or changing behaviours in significant ways without really solid justification.

In the past, every x number of commits I'd manually create a PR that bumps the version and triggers the new changelog. This wasn't really a problem because for the most part I was the only person changing anything 😄. In theory the versioning loosely follows semantic versioning and the versioning sort of exists because functionality was always intended to be removed (for example, using anything other than the now native notifier applet for notifications), and I appreciated the chance of this breaking people's workflows and wanting to give them something tangible to see this coming with.

The other slight issue is that the script once created is not periodically recreated, so there had to be some mechanism to essentially get people to delete and then start the autoupdate command locally every now and again to ensure any changes to how the script was handled had actually trickled through to them.