You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@whimsical.apache.org by se...@apache.org on 2020/12/29 13:43:58 UTC
[whimsy] branch master updated: Allow for -bin and -src version
suffices
This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 8c2ee21 Allow for -bin and -src version suffices
8c2ee21 is described below
commit 8c2ee21bcf8770fa565107f7d1d690089fc79a38
Author: Sebb <se...@apache.org>
AuthorDate: Tue Dec 29 13:43:49 2020 +0000
Allow for -bin and -src version suffices
---
tools/download_check.rb | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/tools/download_check.rb b/tools/download_check.rb
index c5ba495..4e58b5d 100755
--- a/tools/download_check.rb
+++ b/tools/download_check.rb
@@ -443,9 +443,20 @@ def _checkDownloadPage(path, tlp, version)
ext = $2 # save for use after RE match
$vercheck[base] = [h =~ %r{^https?://archive.apache.org/} ? 'archive' : (h =~ %r{https?://repo\d?\.maven(\.apache)?\.org/} ? 'maven' : 'live')]
unless $vercheck[base].first == 'archive'
- # version must include '.'
+ # version must include '.', e.g. xxx-m.n.oyyy
if base[0..-(ext.size+2)] =~ %r{^(.+?)-(\d+\..+)$}
- $versions[$2][$1] << ext
+ # $1 = part before version
+ # $2 = version + any suffix, e.g. -bin, -src (or other)
+ pfx = $1
+ ver = $2
+ # does version have a suffix which is really part of the name?
+ if ver =~ %r{^(\d+(?:\.\d+)+)(-.+)$}
+ if %w(-bin -src).include? $2
+ ver = $1
+ pfx = pfx + $2
+ end
+ end
+ $versions[ver][pfx] << ext
else
W "Cannot parse #{base} for version"
end