Opened 8 years ago

Last modified 7 years ago

#53940 new enhancement

github port group: livecheck options to match latest stable release

Reported by: l2dy (Zero King) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: skymoo (Adam Mercer), raimue (Rainer Müller), ryandesign (Ryan Carsten Schmidt)
Port:

Description

I suggest that we provide an option to only check the latest release instead of tags. This could be useful for many ports like git-lfs, irssi, weechat, syncthing-0.14 that have rc or snapshot tags. The following line works but setting it in the PG is better in case the url changes.

livecheck.url   ${github.homepage}/releases/latest

Change History (9)

comment:1 Changed 8 years ago by skymoo (Adam Mercer)

Cc: skymoo added

comment:2 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

We probably don't need another exposed option for this. We can tie it to the existing github.tarball_from releases.

comment:3 in reply to:  2 Changed 8 years ago by l2dy (Zero King)

Replying to ryandesign:

We probably don't need another exposed option for this. We can tie it to the existing github.tarball_from releases.

No, livecheck from the latest release works as long as the maintainer have been using GitHub releases (instead of only Git tags), but the source tarball is not necessarily distributed there. For example, weechat provides no download from releases and git-lfs only provides binaries there, but both have been using GitHub releases to put release notes.

comment:4 Changed 8 years ago by raimue (Rainer Müller)

Seems quite safe to always use your suggestion. If no releases exist for this GitHub project, this URL redirects to the list of tags.

comment:5 Changed 8 years ago by raimue (Rainer Müller)

Cc: raimue added

comment:6 in reply to:  4 ; Changed 8 years ago by l2dy (Zero King)

Replying to raimue:

Seems quite safe to always use your suggestion. If no releases exist for this GitHub project, this URL redirects to the list of tags.

Safe in most cases, but some repositories used GitHub releases for older versions but switched to Git tags only. In this case checking "latest" release won't work.

Last edited 8 years ago by l2dy (Zero King) (previous) (diff)

comment:7 in reply to:  6 Changed 7 years ago by l2dy (Zero King)

Replying to l2dy:

Replying to raimue:

Seems quite safe to always use your suggestion. If no releases exist for this GitHub project, this URL redirects to the list of tags.

Safe in most cases, but some repositories used GitHub releases for older versions but switched to Git tags only. In this case checking "latest" release won't work.

e.g. https://github.com/weechat/weechat/releases

Actually, they delay creating GitHub releases for some releases. But still this means we shouldn't use the ...releases/latest URL as default.

Version 2, edited 7 years ago by l2dy (Zero King) (previous) (next) (diff)

comment:8 Changed 7 years ago by raimue (Rainer Müller)

Cc: ryandesign added
Summary: github PG: livecheck only latest releasegithub port group: livecheck options to match latest stable release

Has duplicate #56065.

In the same direction, #56065 asks for an option to change the default regex for tags without exposing deep many details of the github port group. Seems like both could be solved with a set of new options:

  • github.livecheck.page [releases|tags]
    Not using .url as it is not supposed to be a full URL, but relative to the homepage at github. Defaults to tags for backwards compatibility.
    Implemented with default livecheck.url ${github.homepage}/${github.livecheck.page}.
  • github.livecheck.tag_regex ...
    The regex to be matched against the tag name. Defaults to [join ${github.tag_prefix} ""](\[^"\]+).
    Implemented with default livecheck.regex archive/${github.livecheck.tag_regex}${extract.suffix}.

Does this seem reasonable?

comment:9 in reply to:  8 Changed 7 years ago by l2dy (Zero King)

Replying to raimue:

Has duplicate #56065.

In the same direction, #56065 asks for an option to change the default regex for tags without exposing deep many details of the github port group. Seems like both could be solved with a set of new options:

  • github.livecheck.page [releases|tags]
    Not using .url as it is not supposed to be a full URL, but relative to the homepage at github. Defaults to tags for backwards compatibility.
    Implemented with default livecheck.url ${github.homepage}/${github.livecheck.page}.

We need ${github.homepage}/releases/latest, not ${github.homepage}/releases. The latter is no different from tags because they both list all recent tags.

Note: See TracTickets for help on using tickets.