Re: Changed Github download URLs are affecting lots of existing watch files
Le 26/03/2021 à 22:38, Andreas Tille a écrit :
> Hi,
>
> I just learned that what was formerly something like
>
> https://github.com/#GITHUBUSER#/#PACKAGE#/releases/latest .*/archive/#PREFIX#@ANY_VERSION@\.tar\.gz
>
> has to be
>
> https://github.com/#GITHUBUSER#/#PACKAGE#/releases/latest .*/archive.*/#PREFIX#@ANY_VERSION@\.tar\.gz
>
> now (at least) since what was formerly
>
> .*/archive/
>
> became now
>
> .*/archive/refs/tags/
>
> This breaks at least all Debian Med packages refereing to Github and
> probably way more. This means our toolset will fail to detect new
> upstream versions.
>
> Any idea what to do (besides uploading all packages obtained from
> Github right after the release)?
This breaks also more than thousand package from JS Team.
We could perhaps handle that with uscan then each time GitHub changes
its website, only uscan should be updated.
IDEA 1: create a uscan macro
version=4
opts=\
filenamemangle=s/.*\/@ANY_VERSION@\.tar\.gz/@PACKAGE@-$1.tar.gz/ \
https://github.com/user/module/tags @GITHUBREGEX@
IDEA 2: create a uscan option:
version=4
opts="githubTags" https://github.com/user/module
Then uscan will replace this by
opts=\
filenamemangle=s/.*\/@ANY_VERSION@\.tar\.gz/@PACKAGE@-$1.tar.gz/ \
https://github.com/user/module/tags \
.*/archive/.*/v?@ANY_VERSION@\.tar\.gz
Same idea for "githubReleases" (use ".../releases" instead of ".../tags")
Cheers,
Xavier
Reply to: