create Folder latest / move Update out of Version to rename

This commit is contained in:
sebastian.serfling
2024-08-12 15:08:04 +02:00
parent ba564899b9
commit 293267e70c
3 changed files with 6 additions and 6 deletions
+4 -4
View File
@@ -20,15 +20,15 @@ print(current_version)
if current_version != new_version:
try:
git.Repo.clone_from("http://172.17.1.251/sebastian.serfling/Agents.git",get_latest_release("",""))
git.Repo.clone_from("http://172.17.1.251/sebastian.serfling/Agents.git",f'../{get_latest_release("","")}')
except:
next
if os.path.isdir(f"{new_version}"):
if os.path.isdir(f"../{new_version}"):
try:
shutil.move("latest", f"{current_version}")
shutil.move("latest", f"../{current_version}")
except:
print("folder not Found")
os.rename(f"{new_version}", "latest")
shutil.move(f"../{new_version}", "../latest")