Skip to content

Commit e5844d7

Browse files
authored
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 :(
1 parent a77638d commit e5844d7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

emsdk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,8 @@ class Tool:
13951395
success = git_clone_checkout_and_pull(url, self.installation_path(), self.git_branch)
13961396
elif url.endswith('zip') or url.endswith('.tar') or url.endswith('.gz') or url.endswith('.xz') or url.endswith('.tbz2'):
13971397
download_even_if_exists = (self.id == 'vs-tool')
1398-
success = download_and_unzip(url, self.installation_path(), download_even_if_exists, filename_prefix=self.zipfile_prefix if hasattr(self, 'zipfile_prefix') else '')
1398+
filename_prefix = getattr(self, 'zipfile_prefix', '')
1399+
success = download_and_unzip(url, self.installation_path(), download_even_if_exists=download_even_if_exists, filename_prefix=filename_prefix)
13991400
else:
14001401
dst_file = download_file(urljoin(emsdk_packages_url, self.download_url()), self.installation_path())
14011402
if dst_file: success = True

emsdk_manifest.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@
195195
"version": "upstream-%waterfall-lkgr%",
196196
"bitness": 64,
197197
"linux_url": "https://storage.googleapis.com/wasm-llvm/builds/linux/%waterfall-lkgr%/wasm-binaries.tbz2",
198+
"zipfile_prefix": "%waterfall-lkgr%-",
198199
"install_path": "upstream/%waterfall-lkgr%",
199200
"activated_path": "%installation_dir%/emscripten",
200201
"activated_cfg": "LLVM_ROOT='%installation_dir%/bin';BINARYEN_ROOT='%installation_dir%'"
@@ -204,6 +205,7 @@
204205
"version": "fastcomp-%waterfall-lkgr%",
205206
"bitness": 64,
206207
"linux_url": "https://storage.googleapis.com/wasm-llvm/builds/linux/%waterfall-lkgr%/wasm-binaries.tbz2",
208+
"zipfile_prefix": "%waterfall-lkgr%-",
207209
"install_path": "fastcomp/%waterfall-lkgr%",
208210
"activated_path": "%installation_dir%/emscripten",
209211
"activated_cfg": "LLVM_ROOT='%installation_dir%/fastcomp/bin';BINARYEN_ROOT='%installation_dir%'"

0 commit comments

Comments
 (0)