Commit graph

5 commits

Author SHA1 Message Date
Sam Coe
1d7ffc2013
Add support for LocalAppData and .local/state/ fallback 2021-06-01 15:50:10 -04:00
Mislav Marohnić
feb4acc2c0 Suggest brew upgrade gh when new version detected
When the update notifier is enabled and a new version was detected, show
a Homebrew upgrade notice if:
- the release was at least 24 hours ago; and
- the current `gh` binary is under the Homebrew prefix.
2021-02-08 13:57:08 +01:00
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
Cristian Dominguez
ce151420f3 Migrate legacy tests 2021-01-11 21:07:19 -03:00
Mislav Marohnić
2843ffff23 Classify the update package as internal 2020-12-15 16:09:08 +01:00