Fix get-bwc-version for 5.0.0 (#21249)
5.0.0 is at artifacts.elastic.co.
This commit is contained in:
parent
b72a708c0d
commit
cf6d3f7ec1
|
@ -9,7 +9,7 @@
|
|||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on
|
||||
# software distributed under the License is distributed on
|
||||
# an 'AS IS' BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
|
||||
# either express or implied. See the License for the specific
|
||||
# language governing permissions and limitations under the License.
|
||||
|
@ -38,7 +38,7 @@ def parse_config():
|
|||
|
||||
def main():
|
||||
c = parse_config()
|
||||
|
||||
|
||||
if not os.path.exists(c.path):
|
||||
print('Creating %s' % c.path)
|
||||
os.mkdir(c.path)
|
||||
|
@ -53,7 +53,7 @@ def main():
|
|||
shutil.rmtree(version_dir)
|
||||
else:
|
||||
print('Version %s exists at %s' % (c.version, version_dir))
|
||||
return
|
||||
return
|
||||
|
||||
# before 1.4.0, the zip file contains windows scripts, and tar.gz contained *nix scripts
|
||||
if is_windows:
|
||||
|
@ -67,14 +67,14 @@ def main():
|
|||
elif c.version.startswith('0.') or c.version.startswith('1.'):
|
||||
url = 'https://download.elasticsearch.org/elasticsearch/elasticsearch/%s' % filename
|
||||
else:
|
||||
url = 'http://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/%s/%s' % (c.version, filename)
|
||||
url = 'https://artifacts.elastic.co/downloads/elasticsearch/%s' % filename
|
||||
print('Downloading %s' % url)
|
||||
urllib.request.urlretrieve(url, filename)
|
||||
|
||||
print('Extracting to %s' % version_dir)
|
||||
if is_windows:
|
||||
archive = zipfile.ZipFile(filename)
|
||||
archive.extractall()
|
||||
archive.extractall()
|
||||
else:
|
||||
# for some reason python's tarfile module has trouble with ES tgz?
|
||||
subprocess.check_call('tar -xzf %s' % filename, shell=True)
|
||||
|
|
Loading…
Reference in New Issue