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 2021/02/18 12:33:48 UTC

[whimsy] branch master updated: Tweak version checking

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 50ae7dc  Tweak version checking
50ae7dc is described below

commit 50ae7dcdb6c89d57165ed4c9b6d869c3ed05aa9f
Author: Sebb <se...@apache.org>
AuthorDate: Thu Feb 18 12:33:38 2021 +0000

    Tweak version checking
---
 tools/download_check.rb | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/tools/download_check.rb b/tools/download_check.rb
index c2bf846..a495c5b 100755
--- a/tools/download_check.rb
+++ b/tools/download_check.rb
@@ -444,19 +444,21 @@ 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'
+              stem = base[0..-(ext.size+2)]
               # version must include '.', e.g. xxx-m.n.oyyy
-              if base[0..-(ext.size+2)] =~ %r{^(.+?)-(\d+\..+)$}
+              if stem =~ %r{^(.+?)-(\d+\..+)$}
                 # $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+)+)(-.+)$}
-                  ver1 = $1 # save result
-                  ver2 = $2
-                  if %w(-bin -src).include? $2 or $2 =~ %r{^-(bin|beta\d)-} # allow for -bin-scala...
+                # jmeter needs _ here
+                if ver =~ %r{^(\d+(?:\.\d+)+)[-_]}
+                  ver1 = $1 # save version
+                  # -source-release etc => Camel
+                  if %w(-bin -src _src -source-release -linux-64bit -mac-64bit -windows-64bit).include? $2 or $2 =~ %r{^-(bin|beta\d)-} # allow for -bin-scala...
+                    pfx = stem
                     ver = ver1
-                    pfx = pfx + ver2
                   end
                 end
                 $versions[ver][pfx] << ext