cli/internal/update
Mislav Marohnić 82d19b73d6 Update notifier: avoid false positives when gh is built from source
When gh was built from source, the version number will look something
like this since it's taken from `git describe`:

    v1.4.0-34-g{SHA}

When compared as semver against `v1.4.0`, the latter version is falsely
reported as newer. This is because the output of `git describe` wasn't
meant to be interpreted as semver.

The solution is to translate the `git describe` string to faux-semver so
it can be safely compared with the version reported from the server.

Fixes this case:

    A new release of gh is available: v1.4.0-41-g2f9e4cb1 → v1.4.0
    https://github.com/cli/cli/releases/tag/v1.4.0
2021-01-20 16:13:50 +01:00
..
update.go Update notifier: avoid false positives when gh is built from source 2021-01-20 16:13:50 +01:00
update_test.go Update notifier: avoid false positives when gh is built from source 2021-01-20 16:13:50 +01:00