Re: How to ignore some versions for watch file?

2020-08-07 Thread Roger Shimizu
Dear Eriberto, and Sergio,

Really thanks for your help!

Yes, "downgrade" 2019 to 0.2019, is the perfect solution for my case.
And searching for \. by force seems to be a more generic solution.

I tried both, and both work as expected.
And through this practise, I understand the syntax for watch file
deeper than before.
Very appreciated!

> [1] https://wiki.debian.org/debian/watch
> [2] 
> http://eriberto.pro.br/blog/2013/10/07/how-to-write-a-good-debianwatch-easily/

Eriberto maybe you can add this tip to your blog post [2].
And I'll try to add it to wiki [1] later.

Cheers,
-- 
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1



Re: How to ignore some versions for watch file?

2020-08-06 Thread Eriberto Mota
Em qui., 6 de ago. de 2020 às 14:35, Eriberto Mota
 escreveu:

Note that the web browser plus webmail breaked the lines after
"releases". The two last lines shown below in each rule must be put in
a single line only.

> version=4
> https://github.com/shadowsocks/v2ray-plugin/releases
> .*/archive/v?(\d+\.\S+)\.tar\.(?:bz2|gz|xz)
>
> version=4
> opts=uversionmangle=s/2019/0.2019/ \
> https://github.com/shadowsocks/v2ray-plugin/releases
> .*/archive/v?(\d\S+)\.tar\.(?:bz2|gz|xz)

Eriberto



Re: How to ignore some versions for watch file?

2020-08-06 Thread Sergio Durigan Junior
On Thursday, August 06 2020, Roger Shimizu wrote:

> Dear mentors list,
>
> I maintain a package that previously used vMMDD 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 vMMDD, 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/


signature.asc
Description: PGP signature


Re: How to ignore some versions for watch file?

2020-08-06 Thread Eriberto Mota
Em qui., 6 de ago. de 2020 às 13:48, Roger Shimizu  escreveu:
>
> I maintain a package that previously used vMMDD 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 vMMDD, 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



How to ignore some versions for watch file?

2020-08-06 Thread Roger Shimizu
Dear mentors list,

I maintain a package that previously used vMMDD 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 vMMDD, 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/

Thank you!

Cheers.
-- 
Roger Shimizu, GMT +9 Tokyo
PGP/GPG: 4096R/6C6ACD6417B3ACB1