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 2022/05/06 22:29:15 UTC

[whimsy] branch master updated: Add support for OoO and JS

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 c4acbfaa Add support for OoO and JS
c4acbfaa is described below

commit c4acbfaa5a40ad38f63cbff09c9d3446fb636a7f
Author: Sebb <se...@apache.org>
AuthorDate: Fri May 6 23:29:09 2022 +0100

    Add support for OoO and JS
---
 tools/download_check.rb | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/tools/download_check.rb b/tools/download_check.rb
index 0b60e070..1dfa516d 100755
--- a/tools/download_check.rb
+++ b/tools/download_check.rb
@@ -56,7 +56,8 @@ $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
-ARTIFACT_RE = %r{/([^/]+\.(pom|crate|tar|tar\.xz|tar\.gz|deb|nbm|dmg|sh|zip|tgz|far|tar\.bz2|jar|whl|war|msi|exe|rar|rpm|nar|xml|vsix))([&?]action=download)?$}
+# OOO SF links end in /download
+ARTIFACT_RE = %r{/([^/]+\.(pom|crate|tar|tar\.xz|tar\.gz|deb|nbm|dmg|sh|zip|tgz|far|tar\.bz2|jar|whl|war|msi|exe|rar|rpm|nar|xml|vsix))([&?]action=download|/download)?$}
 
 def init
   # build a list of validation errors
@@ -306,6 +307,7 @@ VERIFY_TEXT = [
   'To check a GPG signature',
   'To verify Hadoop',
   'Instructions for verifying your mirrored downloads', # fineract
+  'How to verify the download?', # OOO
 ]
 
 ALIASES = {
@@ -372,7 +374,11 @@ def _checkDownloadPage(path, tlp, version)
   end
 
   # check the main body
-  body = check_page(path)
+  if $ALLOW_JS
+    body = `/srv/whimsy/tools/render-page.js #{path}`
+  else
+    body = check_page(path)
+  end
 
   return unless body
 
@@ -800,6 +806,7 @@ if __FILE__ == $0
   $ALLOW_HTTP = ARGV.delete '--http'
   $FAIL_FAST = ARGV.delete '--ff'
   $SHOW_LINKS = ARGV.delete '--show-links'
+  $ALLOW_JS = ARGV.delete '--js-allow'
 
   # check for any unhandled options
   ARGV.each do |arg|