You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by jp...@apache.org on 2022/01/05 14:55:01 UTC
[lucene] branch branch_9x updated: Use CDN to download source release. (#529)
This is an automated email from the ASF dual-hosted git repository.
jpountz pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/branch_9x by this push:
new 2fd41b8 Use CDN to download source release. (#529)
2fd41b8 is described below
commit 2fd41b8ff254f745447a8efa57760d03854631a4
Author: Adrien Grand <jp...@gmail.com>
AuthorDate: Wed Jan 5 15:54:33 2022 +0100
Use CDN to download source release. (#529)
---
dev-tools/scripts/addBackcompatIndexes.py | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/dev-tools/scripts/addBackcompatIndexes.py b/dev-tools/scripts/addBackcompatIndexes.py
index 289839b..e0023f3 100755
--- a/dev-tools/scripts/addBackcompatIndexes.py
+++ b/dev-tools/scripts/addBackcompatIndexes.py
@@ -167,8 +167,8 @@ def check_backcompat_tests():
scriptutil.run('./gradlew -p lucene/backward-codecs test --tests TestBackwardsCompatibility')
print('ok')
-def download_from_mirror(version, remotename, localname):
- url = 'http://apache.cs.utah.edu/lucene/java/%s/%s' % (version, remotename)
+def download_from_cdn(version, remotename, localname):
+ url = 'http://dlcdn.apache.org/lucene/java/%s/%s' % (version, remotename)
try:
urllib.request.urlretrieve(url, localname)
return True
@@ -199,9 +199,9 @@ def download_release(version, temp_dir, force):
filename = 'lucene-%s-src.tgz' % version
source_tgz = os.path.join(temp_dir, filename)
- if not download_from_mirror(version, filename, source_tgz) and \
+ if not download_from_cdn(version, filename, source_tgz) and \
not download_from_archives(version, filename, source_tgz):
- raise Exception('Could not find version %s in apache mirror or archives' % version)
+ raise Exception('Could not find version %s in apache CDN or archives' % version)
olddir = os.getcwd()
os.chdir(temp_dir)