import json from pathlib import Path archive=Path('/tmp/xingyu-home-two-tabs-20260902-091453.zip') entry=Path('/www/wwwroot/im.bchongw.com/app') expected=Path('/www/wwwroot/xingyu-h5/releases/20260902-091520') assert entry.resolve()==expected removed=False if archive.exists(): assert archive.parent==Path('/tmp') and archive.name.startswith('xingyu-home-two-tabs-') archive.unlink(); removed=True print(json.dumps({'h5Release':str(entry.resolve()),'temporaryArchiveRemoved':removed}))