mirror of
https://github.com/unmojang/meta.git
synced 2025-09-24 03:31:03 -04:00
fix: only download experiments if they are not present
Experiments won't change anyway, so let's assume they are up-to-date if they are on disk.
This commit is contained in:
parent
005e462e06
commit
c32f0c42a1
@ -90,8 +90,13 @@ def main():
|
|||||||
|
|
||||||
for x in experiment_ids:
|
for x in experiment_ids:
|
||||||
version = experiments.versions[x]
|
version = experiments.versions[x]
|
||||||
|
experiment_path = os.path.join(UPSTREAM_DIR, VERSIONS_DIR, f"{x}.json")
|
||||||
|
|
||||||
print("Updating experiment " + version.id)
|
print("Updating experiment " + version.id)
|
||||||
fetch_zipped_version(os.path.join(UPSTREAM_DIR, VERSIONS_DIR, f"{x}.json"), version.url)
|
if not os.path.isfile(experiment_path):
|
||||||
|
fetch_zipped_version(experiment_path, version.url)
|
||||||
|
else:
|
||||||
|
print("Already have experiment " + version.id)
|
||||||
|
|
||||||
remote_versions.index.write(version_manifest_path)
|
remote_versions.index.write(version_manifest_path)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user