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/06/11 11:26:53 UTC
[whimsy] branch master updated: Fix RE matching
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 680d204 Fix RE matching
680d204 is described below
commit 680d20405a4db0e425de9a4ebe7b4f9cf5e349b7
Author: Sebb <se...@apache.org>
AuthorDate: Thu Jun 11 12:26:44 2020 +0100
Fix RE matching
---
tools/download_check.rb | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/download_check.rb b/tools/download_check.rb
index 307c6df..0844eef 100755
--- a/tools/download_check.rb
+++ b/tools/download_check.rb
@@ -221,10 +221,10 @@ def WE(msg)
end
# returns www|archive, stem and the hash extension
def check_hash_loc(h,tlp)
- if h =~ %r{^(https?)://(?:(archive|www)\.)?apache\.org/dist/(?:incubator/)?#{tlp}/.*([^/]+)(\.(\w{3,6}))$}
+ if h =~ %r{^(https?)://(?:(archive|www)\.)?apache\.org/dist/(?:incubator/)?#{tlp}/.*?([^/]+)\.(\w{3,6})$}
WE "HTTPS! #{h}" unless $1 == 'https'
return $2,$3,$4
- elsif h =~ %r{^(https?)://downloads\.apache\.org/(?:incubator/)?#{tlp}/.*([^/]+)(\.(\w{3,6}))$}
+ elsif h =~ %r{^(https?)://(downloads)\.apache\.org/(?:incubator/)?#{tlp}/.*?([^/]+)\.(\w{3,6})$}
WE "HTTPS! #{h}" unless $1 == 'https'
return $2,$3,$4
elsif h =~ %r{^(https?)://repo\.(maven)\.apache\.org/maven2/org/apache/#{tlp}/.+/([^/]+)(\.(\w{3,6}))$} # Maven