On Thursday, August 06 2020, Roger Shimizu wrote: > Dear mentors list, > > 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. This did it for me version=4 opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%shadowsocks-v2ray-plugin_$1.orig.tar.gz%,\ uversionmangle=s/(\d)[_\.\-\+]?(RC|rc|pre|dev|beta|alpha)[.]?(\d*)$/\$1~\$2\$3/" \ https://github.com/shadowsocks/v2ray-plugin/tags .*/v?(\d\.\S*)\.tar\.gz debian ^^ The only thing I changed is the extra "\.", which I tried to "highlight" above. This assumes that every version will contain at least one dot, which I think is a safe assumption given upstream's history. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible https://sergiodj.net/
Attachment:
signature.asc
Description: PGP signature