add: automatic change version for .desktop files
This commit is contained in:
parent
618be48726
commit
e4227b2194
@ -1,8 +1,19 @@
|
|||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
def get_version():
|
||||||
|
with open("Cargo.toml") as fh:
|
||||||
|
for line in fh:
|
||||||
|
if line.startswith("version"):
|
||||||
|
return line.replace("version", "").replace("=", "").replace('"', '').strip()
|
||||||
|
return ''
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
# check version
|
||||||
|
version = get_version()
|
||||||
os.chdir("appimage")
|
os.chdir("appimage")
|
||||||
|
os.system("sed -i 's/^Version=.*/Version=%s/g' rustdesk.desktop" % version)
|
||||||
|
# build appimage
|
||||||
ret = os.system("appimage-builder --recipe AppImageBuilder.yml --skip-test")
|
ret = os.system("appimage-builder --recipe AppImageBuilder.yml --skip-test")
|
||||||
if ret == 0:
|
if ret == 0:
|
||||||
print("RustDesk AppImage build success :)")
|
print("RustDesk AppImage build success :)")
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[Desktop Entry]
|
[Desktop Entry]
|
||||||
Version=1.0
|
Version=1.2.0
|
||||||
Name=RustDesk
|
Name=RustDesk
|
||||||
GenericName=Remote Desktop
|
GenericName=Remote Desktop
|
||||||
Comment=Remote Desktop
|
Comment=Remote Desktop
|
||||||
|
Loading…
x
Reference in New Issue
Block a user