mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 21:07:24 +00:00
28 lines
818 B
Python
28 lines
818 B
Python
import subprocess
|
|
import os
|
|
|
|
debianContent = ''
|
|
desktopContent = ''
|
|
version = ''
|
|
|
|
with open('debian/debian.yaml', 'r') as f:
|
|
debianContent = f.read()
|
|
with open('debian/gui/pixes.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/pixes.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/pixes.desktop', 'w') as f:
|
|
f.write(desktopContent)
|