Add the lkgr as a prefix to upstream downloads (#223)

Without this, we would not download new versions, as the filename looked the same ("already downloaded"). We'd unzip those old contents to a directory with the new name, giving the impression we updated when we didn't :(
This commit is contained in:
Alon Zakai
2019-02-25 17:18:58 -08:00
committed by GitHub
parent a77638d5c1
commit e5844d746e
2 changed files with 4 additions and 1 deletions

3
emsdk
View File

@@ -1395,7 +1395,8 @@ class Tool:
success = git_clone_checkout_and_pull(url, self.installation_path(), self.git_branch) success = git_clone_checkout_and_pull(url, self.installation_path(), self.git_branch)
elif url.endswith('zip') or url.endswith('.tar') or url.endswith('.gz') or url.endswith('.xz') or url.endswith('.tbz2'): elif url.endswith('zip') or url.endswith('.tar') or url.endswith('.gz') or url.endswith('.xz') or url.endswith('.tbz2'):
download_even_if_exists = (self.id == 'vs-tool') download_even_if_exists = (self.id == 'vs-tool')
success = download_and_unzip(url, self.installation_path(), download_even_if_exists, filename_prefix=self.zipfile_prefix if hasattr(self, 'zipfile_prefix') else '') filename_prefix = getattr(self, 'zipfile_prefix', '')
success = download_and_unzip(url, self.installation_path(), download_even_if_exists=download_even_if_exists, filename_prefix=filename_prefix)
else: else:
dst_file = download_file(urljoin(emsdk_packages_url, self.download_url()), self.installation_path()) dst_file = download_file(urljoin(emsdk_packages_url, self.download_url()), self.installation_path())
if dst_file: success = True if dst_file: success = True

View File

@@ -195,6 +195,7 @@
"version": "upstream-%waterfall-lkgr%", "version": "upstream-%waterfall-lkgr%",
"bitness": 64, "bitness": 64,
"linux_url": "https://storage.googleapis.com/wasm-llvm/builds/linux/%waterfall-lkgr%/wasm-binaries.tbz2", "linux_url": "https://storage.googleapis.com/wasm-llvm/builds/linux/%waterfall-lkgr%/wasm-binaries.tbz2",
"zipfile_prefix": "%waterfall-lkgr%-",
"install_path": "upstream/%waterfall-lkgr%", "install_path": "upstream/%waterfall-lkgr%",
"activated_path": "%installation_dir%/emscripten", "activated_path": "%installation_dir%/emscripten",
"activated_cfg": "LLVM_ROOT='%installation_dir%/bin';BINARYEN_ROOT='%installation_dir%'" "activated_cfg": "LLVM_ROOT='%installation_dir%/bin';BINARYEN_ROOT='%installation_dir%'"
@@ -204,6 +205,7 @@
"version": "fastcomp-%waterfall-lkgr%", "version": "fastcomp-%waterfall-lkgr%",
"bitness": 64, "bitness": 64,
"linux_url": "https://storage.googleapis.com/wasm-llvm/builds/linux/%waterfall-lkgr%/wasm-binaries.tbz2", "linux_url": "https://storage.googleapis.com/wasm-llvm/builds/linux/%waterfall-lkgr%/wasm-binaries.tbz2",
"zipfile_prefix": "%waterfall-lkgr%-",
"install_path": "fastcomp/%waterfall-lkgr%", "install_path": "fastcomp/%waterfall-lkgr%",
"activated_path": "%installation_dir%/emscripten", "activated_path": "%installation_dir%/emscripten",
"activated_cfg": "LLVM_ROOT='%installation_dir%/fastcomp/bin';BINARYEN_ROOT='%installation_dir%'" "activated_cfg": "LLVM_ROOT='%installation_dir%/fastcomp/bin';BINARYEN_ROOT='%installation_dir%'"