diff --git a/fetch.py b/fetch.py index 70cd670..92daa57 100644 --- a/fetch.py +++ b/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)