You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by iv...@apache.org on 2020/05/15 14:34:27 UTC
[lucene-solr] branch branch_8x updated: LUCENE-9288:
poll_mirrors.py release script can handle HTTPS mirrors (#1520)
This is an automated email from the ASF dual-hosted git repository.
ivera pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new 138486a LUCENE-9288: poll_mirrors.py release script can handle HTTPS mirrors (#1520)
138486a is described below
commit 138486a632e456520edebb85d20c72ad35d11cc7
Author: Ignacio Vera <iv...@apache.org>
AuthorDate: Fri May 15 16:33:23 2020 +0200
LUCENE-9288: poll_mirrors.py release script can handle HTTPS mirrors (#1520)
---
dev-tools/scripts/poll-mirrors.py | 20 +++++++++++++++++---
lucene/CHANGES.txt | 2 ++
2 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/dev-tools/scripts/poll-mirrors.py b/dev-tools/scripts/poll-mirrors.py
index 9a96a75..7a94a29 100755
--- a/dev-tools/scripts/poll-mirrors.py
+++ b/dev-tools/scripts/poll-mirrors.py
@@ -44,8 +44,10 @@ def p(s):
def mirror_contains_file(url):
url = urlparse(url)
-
- if url.scheme == 'http':
+
+ if url.scheme == 'https':
+ return https_file_exists(url)
+ elif url.scheme == 'http':
return http_file_exists(url)
elif url.scheme == 'ftp':
return ftp_file_exists(url)
@@ -65,6 +67,18 @@ def http_file_exists(url):
return exists
+def https_file_exists(url):
+ exists = False
+
+ try:
+ conn = http.HTTPSConnection(url.netloc)
+ conn.request('HEAD', url.path)
+ response = conn.getresponse()
+ exists = response.status == 200
+ except:
+ pass
+
+ return exists
def ftp_file_exists(url):
listing = []
@@ -112,7 +126,7 @@ except Exception as e:
sys.exit(1)
mirror_path = args.path if args.path is not None else 'lucene/java/{}/changes/Changes.html'.format(args.version)
-maven_url = None if args.version is None else 'http://repo1.maven.org/maven2/' \
+maven_url = None if args.version is None else 'https://repo1.maven.org/maven2/' \
'org/apache/lucene/lucene-core/{0}/lucene-core-{0}.pom.asc'.format(args.version)
maven_available = False
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 63fcd87..5460ae2 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -146,6 +146,8 @@ Other
* LUCENE-9358: Change the way the multi-dimensional BKD tree builder generates the intermediate tree representation to be
equal to the one dimensional case to avoid unnecessary tree and leaves rotation. (Ignacio Vera)
+* LUCENE-9288: poll_mirrors.py release script can handle HTTPS mirrors. (Ignacio Vera)
+
Build
* Upgrade forbiddenapis to version 3.0. (Uwe Schindler)