Em qui., 6 de ago. de 2020 às 13:48, Roger Shimizu <r...@debian.org> escreveu: > > I maintain a package that previously used vYYYYMMDD as version, but > now changed to v1.y.z > - https://tracker.debian.org/pkg/shadowsocks-v2ray-plugin > - https://github.com/shadowsocks/v2ray-plugin/tags > > So my question is how to ignore the old version vYYYYMMDD, and only > detect v1.y.z as latest version for d/watch file? > > BTW. I already read a few posts regarding on d/watch file [1][2], but > still didn't find a proper solution. > > [1] https://wiki.debian.org/debian/watch > [2] > http://eriberto.pro.br/blog/2013/10/07/how-to-write-a-good-debianwatch-easily/
Hi Roger, I cast a glance at your debian/watch file. You are using a rule provided by the original debian/watch template. Personally, I don't really like this format because I think it is very complex. You can watch directly the "releases" link from any GitHub project. I intend to help you with a light format. There are several possibilities. I will show you two solutions. The first solution is search for one or more digits (\d+), followed by a dot (\.), followed by any character except blank spaces (\S+). It is a Perl Regex. See below: version=4 https://github.com/shadowsocks/v2ray-plugin/releases .*/archive/v?(\d+\.\S+)\.tar\.(?:bz2|gz|xz) Note that "v" (from version) is optional (v?) and we will accept .tar.bz2, .tar.gz and .tar.xz extensions. Another way is downgrading all versions starting with 2019. In this case we can use any digit followed by any character except blank spaces (\d\S+). version=4 opts=uversionmangle=s/2019/0.2019/ \ https://github.com/shadowsocks/v2ray-plugin/releases .*/archive/v?(\d\S+)\.tar\.(?:bz2|gz|xz) There are several other solutions. In your original debian/watch (I don't like this format) you can combine the last solution. Regards, Eriberto