This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch member_data
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/member_data by this push:
new 2835afc Sync with master
2835afc is described below
commit 2835afc878350e9f7b3d476a1dca501e141bcee4
Author: Sebb <[email protected]>
AuthorDate: Tue Mar 22 22:51:43 2022 +0000
Sync with master
---
tools/download_check.rb | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/tools/download_check.rb b/tools/download_check.rb
index 80eea42..17d9a81 100755
--- a/tools/download_check.rb
+++ b/tools/download_check.rb
@@ -56,9 +56,7 @@ $versions = Hash.new {|h1, k1| h1[k1] = Hash.new {|h2, k2|
h2[k2] = Array.new} }
# match an artifact
# TODO detect artifacts by URL as well if possible
# $1 = base, $2 = extension
-# Skywalking uses .crate
-# TODO: better method for detecting artifacts that does not rely on
enumerating types
-ARTIFACT_RE =
%r{/([^/]+\.(pom|tar|tar\.xz|tar\.gz|deb|nbm|dmg|sh|zip|tgz|tar\.bz2|jar|whl|war|msi|exe|rar|rpm|nar|xml|crate))([&?]action=download)?$}
+ARTIFACT_RE =
%r{/([^/]+\.(pom|tar|tar\.xz|tar\.gz|deb|nbm|dmg|sh|zip|tgz|far|tar\.bz2|jar|whl|war|msi|exe|rar|rpm|nar|xml))([&?]action=download)?$}
def init
# build a list of validation errors
@@ -342,7 +340,10 @@ end
def text2ext(txt)
# need to strip twice to handle ' [ asc ] '
# TODO: perhaps just remove all white-space?
- tmp = txt.downcase.strip.sub(%r{^\.}, '').sub(%r{^\[(.+)\]$}, '\1').sub('-',
'').sub(/ ?(digest|checksum)/, '').sub(/ \(tar\.gz\)| \(zip\)| /, '').strip
+ tmp = txt.downcase.strip.sub(%r{^\.}, '').sub(%r{^\[(.+)\]$}, '\1').sub('-',
'').
+ sub(/ ?(digest|checksum)/, '').sub(/ \(tar\.gz\)| \(zip\)| /, '').
+ sub('(opens new window)', ''). # doris
+ strip
return 'sha256' if tmp =~ %r{\A[A-Fa-f0-9]{64}\z}
return 'sha512' if tmp =~ %r{\A[A-Fa-f0-9]{128}\z}
ALIASES[tmp] || tmp
@@ -692,6 +693,10 @@ def _checkDownloadPage(path, tlp, version)
break
end
end
+ if bdy.include? 'The object is in our archive'
+ W "File is archived: '#{name}' in page: '#{h}'"
+ next
+ end
end
end
if path
@@ -707,7 +712,7 @@ def _checkDownloadPage(path, tlp, version)
E "NAK: ct='#{ct}' cl='#{cl}' #{path}"
end
else
- E "Could not find link for '#{name}' in page: '#{h}' (missing or
archived)"
+ E "Could not find link for '#{name}' in page: '#{h}' (missing)"
end
end
elsif h =~ %r{\.(md5|sha\d*)$}