build scripts & issue templates

This commit is contained in:
nyne
2024-10-27 20:16:04 +08:00
parent 8b95442dad
commit 3cea340f97
14 changed files with 437 additions and 2 deletions

26
debian/build.py vendored Normal file
View File

@@ -0,0 +1,26 @@
import subprocess
debianContent = ''
desktopContent = ''
version = ''
with open('debian/debian.yaml', 'r') as f:
debianContent = f.read()
with open('debian/gui/venera.desktop', 'r') as f:
desktopContent = f.read()
with open('pubspec.yaml', 'r') as f:
version = str.split(str.split(f.read(), 'version: ')[1], '+')[0]
with open('debian/debian.yaml', 'w') as f:
f.write(debianContent.replace('{{Version}}', version))
with open('debian/gui/venera.desktop', 'w') as f:
f.write(desktopContent.replace('{{Version}}', version))
subprocess.run(["flutter", "build", "linux"])
subprocess.run(["$HOME/.pub-cache/bin/flutter_to_debian"], shell=True)
with open('debian/debian.yaml', 'w') as f:
f.write(debianContent)
with open('debian/gui/venera.desktop', 'w') as f:
f.write(desktopContent)