An AnnoBase folder left by the old archive fetch is moved aside like one of this step
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
3a58c974d4
commit
18bca6fab3
1 changed files with 2 additions and 1 deletions
3
fetch.py
3
fetch.py
|
|
@ -14,6 +14,7 @@ from pathlib import Path
|
|||
SERVER = "https://git.annodev.software"
|
||||
REPOSITORY = "annodev/anno-base"
|
||||
MARKER = ".annobase-version"
|
||||
OLD_MARKER = ".annobase-archive-ref"
|
||||
|
||||
|
||||
def setting(path, key):
|
||||
|
|
@ -71,7 +72,7 @@ def fetch(version, destination, token):
|
|||
print(f"AnnoBase {version} is already in {destination}")
|
||||
return
|
||||
if destination.exists():
|
||||
if not marker.is_file():
|
||||
if not marker.is_file() and not (destination / OLD_MARKER).is_file():
|
||||
sys.exit(f"{destination} exists and was not made by this step")
|
||||
destination.rename(destination.with_name(f"{destination.name}.replaced.{int(time.time())}"))
|
||||
assets = release_assets(version, token)
|
||||
|
|
|
|||
Loading…
Reference in a new issue