Closed drnic closed 5 years ago
I think best would be to add an option to allow ignoring invalid version. I'll get back on this.
I was working on solving this, but instead of introducing this as a new feature I suggest adjusting the version regex to match only valid semver versions, eg:
regex: (?P<file>freetds-(?P<version>[0-9]+\.[0-9]+\.[0-9]+).tar.gz)
My workaround regex is:
regex: (?P<file>freetds-(?P<version>[1-9][0-9]*\.[1-9][0-9]*\.[0-9]+).*.tar.gz)
The .*.tar.gz
allows for the known .0.0.tar.gz
one-time edge case.
The work I've done so far is this: https://github.com/aequitas/concourse-ftp-resource/compare/wip_ignore_versions?expand=1 but I don't intend to develop it further as I have not touched this code in a while and don't feel like introducing new bugs or exploring all the test edge cases. Feel free to incorporate the code in a build of your own. I'm gonna close the issue now since a workaround is available.
I am trying this resource for ftp://ftp.freetds.org/pub/freetds/stable/ and
check
/ftp.py
is failing on fileftp://ftp.freetds.org/pub/freetds/stable/freetds-0.91.112.0.0.tar.gz
because its version0.91.112.0.0
.My resource is:
The error is:
Could we support this or ignore it? (in my particular case, we don't need this old 0.91.112.0.0, since latest is 1.1.6)