create Folder latest / move Update out of Version to rename
parent
ba564899b9
commit
293267e70c
|
|
@ -2,6 +2,6 @@
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
<mapping directory="$PROJECT_DIR$/latest" vcs="Git" />
|
<mapping directory="$PROJECT_DIR$/1.1" vcs="Git" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
|
|
@ -20,15 +20,15 @@ print(current_version)
|
||||||
|
|
||||||
if current_version != new_version:
|
if current_version != new_version:
|
||||||
try:
|
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:
|
except:
|
||||||
next
|
next
|
||||||
if os.path.isdir(f"{new_version}"):
|
if os.path.isdir(f"../{new_version}"):
|
||||||
try:
|
try:
|
||||||
shutil.move("latest", f"{current_version}")
|
shutil.move("latest", f"../{current_version}")
|
||||||
except:
|
except:
|
||||||
print("folder not Found")
|
print("folder not Found")
|
||||||
os.rename(f"{new_version}", "latest")
|
shutil.move(f"../{new_version}", "../latest")
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue