From 1a50de8e21f595dd7d97611a2385c088c1788e24 Mon Sep 17 00:00:00 2001 From: Prateek Sunal Date: Fri, 27 Sep 2024 00:18:21 +0530 Subject: [PATCH] feat: include_build_number parameter --- .../lib/src/makers/deb/make_deb_config.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/flutter_app_packager/lib/src/makers/deb/make_deb_config.dart b/packages/flutter_app_packager/lib/src/makers/deb/make_deb_config.dart index 4fdf1ee8..79a94a77 100644 --- a/packages/flutter_app_packager/lib/src/makers/deb/make_deb_config.dart +++ b/packages/flutter_app_packager/lib/src/makers/deb/make_deb_config.dart @@ -7,6 +7,7 @@ import 'package:flutter_app_packager/src/api/app_package_maker.dart'; # the name used to display in the OS. Specifically desktop # entry name display_name: Hola Amigos +include_build_number: true # package name for debian/apt repository # the name should be all lowercase with -+. @@ -126,6 +127,7 @@ class MakeDebConfig extends MakeLinuxPackageConfig { required this.installedSize, required this.maintainer, this.startupNotify = true, + this.includeBuildNumber = false, this.essential = false, List? postinstallScripts, List? postuninstallScripts, @@ -155,6 +157,7 @@ class MakeDebConfig extends MakeLinuxPackageConfig { factory MakeDebConfig.fromJson(Map map) { return MakeDebConfig( + includeBuildNumber: map['include_build_number'], displayName: map['display_name'], packageName: map['package_name'], maintainer: @@ -224,6 +227,7 @@ class MakeDebConfig extends MakeLinuxPackageConfig { ); } + bool includeBuildNumber; String displayName; String packageName; String maintainer; @@ -271,7 +275,7 @@ class MakeDebConfig extends MakeLinuxPackageConfig { 'CONTROL': { 'Maintainer': maintainer, 'Package': packageName, - 'Version': appVersion.toString(), + 'Version': includeBuildNumber ? appVersion.toString() : appBuildName, 'Section': section, 'Priority': priority, 'Architecture': _getArchitecture(),