whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Allow for downloads.a.o and .exes
Date Tue, 03 Mar 2020 21:42:25 GMT
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 962c4a2  Allow for downloads.a.o and .exes
962c4a2 is described below

commit 962c4a21895870c406303dbe217a77f3ed50d4ff
Author: Sebb <sebb@apache.org>
AuthorDate: Tue Mar 3 21:42:18 2020 +0000

    Allow for downloads.a.o and .exes
---
 tools/download_check.rb | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tools/download_check.rb b/tools/download_check.rb
index f9acdde..2f154b2 100755
--- a/tools/download_check.rb
+++ b/tools/download_check.rb
@@ -32,7 +32,7 @@ $VERSION = nil
 
 # match an artifact
 # TODO detect artifacts by URL as well if possible
-ARTIFACT_RE = %r{/([^/]+\.(tar|tar\.gz|zip|tgz|tar\.bz2|jar|war|msi|rar|rpm|nar))(&action=download)?$}
+ARTIFACT_RE = %r{/([^/]+\.(tar|tar\.gz|zip|tgz|tar\.bz2|jar|war|msi|exe|rar|rpm|nar))(&action=download)?$}
 
 def init
   # build a list of validation errors
@@ -214,6 +214,9 @@ def check_hash_loc(h,tlp)
   if h =~ %r{^(https?)://(?:(archive|www)\.)?apache\.org/dist/(?:incubator/)?#{tlp}/.*([^/]+)(\.(\w{3,6}))$}
     E "HTTPS! #{h}" unless $1 == 'https'
     return $2,$3,$4
+  elsif h =~ %r{^(https?)://downloads\.apache\.org/(?:incubator/)?#{tlp}/.*([^/]+)(\.(\w{3,6}))$}
+    E "HTTPS! #{h}" unless $1 == 'https'
+    return $2,$3,$4
   else
     E "Unexpected hash location #{h} for #{tlp}"
     nil


Mime
View raw message