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 8d2e6e57 Fix up link text once 8d2e6e57 is described below commit 8d2e6e5794b1c45f82dc542ebb058840e1624438 Author: Sebb <s...@apache.org> AuthorDate: Sat Apr 27 23:32:39 2024 +0100 Fix up link text once --- tools/download_check.rb | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/download_check.rb b/tools/download_check.rb index c5c1fc06..27ab7568 100755 --- a/tools/download_check.rb +++ b/tools/download_check.rb @@ -282,7 +282,8 @@ def get_links(path, body, checkSpaces=false) if href =~ %r{^?Preferred=https?://} href = path + URI.decode_www_form_component(href) end - text = node.text.gsub(/[[:space:]]+/, ' ').strip + # Strip spurious text from link (age, baremaps) + text = node.text.gsub(/[[:space:]]+/, ' ').sub('(opens in a new tab)', '').sub('➚', '').strip [href, text] unless href =~ %r{/httpcomponents.+/xdoc/downloads.xml} # breadcrumb link to source }.select {|x, _y| x =~ %r{^(https?:)?//} } end @@ -581,15 +582,13 @@ def _checkDownloadPage(path, tlp, version) else E "Bug: found hash #{h} for missing artifact #{stem}" end - t.sub!('➚', '') # age - t.strip! next if t == '' # empire-db tmp = text2ext(t) next if ext == tmp # i.e. link is just the type or [TYPE] next if ext == 'sha' and tmp == 'sha1' # historic next if %w(sha256 md5 mds sha512 sha1).include?(ext) and %w(SHA digest Digest CheckSum checksums).include?(t) # generic next if ext == 'mds' and (tmp == 'hashes' or t == 'Digests') - if base != t + unless base == t or h == t # Allow for full path to sig/hash if t == 'Download' # MXNet W "Mismatch: #{h} and '#{t}'" elsif not %w{checksum Hash}.include? t