Skip to content

Commit

Permalink
feat: include_build_number parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekmedia committed Sep 26, 2024
1 parent eb1315d commit 1a50de8
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 -+.
Expand Down Expand Up @@ -126,6 +127,7 @@ class MakeDebConfig extends MakeLinuxPackageConfig {
required this.installedSize,
required this.maintainer,
this.startupNotify = true,
this.includeBuildNumber = false,
this.essential = false,
List<String>? postinstallScripts,
List<String>? postuninstallScripts,
Expand Down Expand Up @@ -155,6 +157,7 @@ class MakeDebConfig extends MakeLinuxPackageConfig {

factory MakeDebConfig.fromJson(Map<String, dynamic> map) {
return MakeDebConfig(
includeBuildNumber: map['include_build_number'],
displayName: map['display_name'],
packageName: map['package_name'],
maintainer:
Expand Down Expand Up @@ -224,6 +227,7 @@ class MakeDebConfig extends MakeLinuxPackageConfig {
);
}

bool includeBuildNumber;
String displayName;
String packageName;
String maintainer;
Expand Down Expand Up @@ -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(),
Expand Down

0 comments on commit 1a50de8

Please sign in to comment.