v0.43.1
This commit is contained in:
1 parent
5b6d4a7903
commit
4d1087e357
160 files changed
+2407
-1933
No files matched your search
@@ -16,7 +16,6 @@ MANAGED = ["build.rs", "langs", "deploy", "debian", "grafana", "make_zip.py", "s
|
||||
"README.md", "LICENSE", "CHANGELOG.md", "AGENTS.md", "SHA256SUMS",
|
||||
".env.example", ".gitignore"]
|
||||
|
||||
|
||||
def upgrade(source: Path, target: Path, *, stopped: bool, data_dir: Path | None = None) -> Path:
|
||||
source = source.resolve()
|
||||
if target.is_symlink():
|
||||
@@ -62,8 +61,6 @@ def upgrade(source: Path, target: Path, *, stopped: bool, data_dir: Path | None
|
||||
installed.append(name)
|
||||
shutil.copytree(new, old)
|
||||
if name == "langs" and (backup / name).is_dir():
|
||||
# Preserve additional site language packs; bundled packs are
|
||||
# updated, with their previous bytes retained in the backup.
|
||||
for pack in (backup / name).glob("*.json"):
|
||||
if pack.is_symlink():
|
||||
raise ValueError("Language packs must not be symlinks.")
|
||||
@@ -72,7 +69,6 @@ def upgrade(source: Path, target: Path, *, stopped: bool, data_dir: Path | None
|
||||
elif new.is_file():
|
||||
installed.append(name)
|
||||
shutil.copy2(new, old)
|
||||
# Obsolete renewal sidecar: validate, record the manifest, then remove it last.
|
||||
runtime_data = (data_dir or (target / "data")).resolve()
|
||||
certs_dir = runtime_data / "certs"
|
||||
if certs_dir.is_symlink():
|
||||
@@ -99,7 +95,6 @@ def upgrade(source: Path, target: Path, *, stopped: bool, data_dir: Path | None
|
||||
for stream in locks:
|
||||
stream.close()
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("target", type=Path)
|
||||
@@ -116,6 +111,5 @@ def main() -> None:
|
||||
print("Preserved data, .env, .git, target and other unmanaged files. No database migration was run.")
|
||||
print(f"Next: cd {args.target}; ./dev.sh test; ./dev.sh")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Reference in new issue
Block a user