diff --git a/debian/build.py b/debian/build.py new file mode 100644 index 0000000..5b60c15 --- /dev/null +++ b/debian/build.py @@ -0,0 +1,27 @@ +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) diff --git a/debian/debian.yaml b/debian/debian.yaml index 1dd2d5b..5e38a94 100644 --- a/debian/debian.yaml +++ b/debian/debian.yaml @@ -7,7 +7,7 @@ flutter_app: control: Package: pixes - Version: 1.0.6 + Version: {{Version}} Architecture: amd64 Priority: optional Depends: diff --git a/debian/gui/pixes.desktop b/debian/gui/pixes.desktop index bd0f2bc..b42ee4a 100644 --- a/debian/gui/pixes.desktop +++ b/debian/gui/pixes.desktop @@ -1,5 +1,5 @@ [Desktop Entry] -Version=1.0.6 +Version={{Version}} Name=Pixes GenericName=Pixes Comment=Unofficial pixiv application diff --git a/lib/foundation/app.dart b/lib/foundation/app.dart index d09ce02..2da81df 100644 --- a/lib/foundation/app.dart +++ b/lib/foundation/app.dart @@ -12,7 +12,7 @@ export "state_controller.dart"; export "navigation.dart"; class _App { - final version = "1.0.6"; + final version = "1.0.7"; bool get isAndroid => Platform.isAndroid; bool get isIOS => Platform.isIOS; diff --git a/pubspec.yaml b/pubspec.yaml index 35ee4e0..7bf2eed 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 1.0.6+106 +version: 1.0.7+107 environment: sdk: '>=3.3.4 <4.0.0'