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