INNER CODE UNIT · Python
name
ivoyager/planetarium · web/post_export.py:64
name = EXPORT_NAME + suffix
missing_files = get_missing_files(name)
if missing_files:
sys.exit(f"ERROR: {EXPORT_DIR} lacks {', '.join(missing_files)}. Nothing was changed.")
add_splash_image(name)
for ending in GZIPPED_ENDINGS:
gzip_in_place(EXPORT_DIR / (name + ending))
delete_boot_splash(EXPORT_DIR / (name + ".png"))
zip_upload(name, EXPORT_DIR / (ZIP_NAME + suffix + ".zip"))
def get_missing_files(name):
"""Return what the upload needs that EXPORT_DIR lacks. A .wasm or .pck already
gzipped isn't missing."""
missing_files = []
for ending in EXPORTED_ENDINGS:
if not (EXPORT_DIR / (name + ending)).is_file():
missing_files.append(name + ending)