Skip to content

Commit

Permalink
fix: add include build number to other build methods
Browse files Browse the repository at this point in the history
  • Loading branch information
prateekmedia committed Sep 28, 2024
1 parent 0ebb016 commit fc44798
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ class MakeDebConfig extends MakeLinuxPackageConfig {
}..removeWhere((key, value) => value == null),
'DESKTOP': {
'Type': 'Application',
'Version': appVersion.toString(),
'Version': includeBuildNumber ? appVersion.toString() : appBuildName,
'Name': displayName,
'GenericName': genericName,
'Icon': appBinaryName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ class MakePacmanConfig extends MakeLinuxPackageConfig {
required this.displayName,
required this.packageName,
this.installedSize,
this.includeBuildNumber = true,
required this.maintainer,
this.packageRelease = 1,
List<String>? postinstallScripts,
Expand Down Expand Up @@ -127,7 +128,8 @@ class MakePacmanConfig extends MakeLinuxPackageConfig {
factory MakePacmanConfig.fromJson(Map<String, dynamic> map) {
return MakePacmanConfig(
displayName: map['display_name'],
packageName: map['package_name'], //
packageName: map['package_name'],
includeBuildNumber: map['include_build_number'] ?? true,
packageRelease: int.tryParse(map['package_release'] ?? '1') ?? 1,
maintainer:
"${map['maintainer']['name']} <${map['maintainer']['email']}>",
Expand Down Expand Up @@ -187,6 +189,7 @@ class MakePacmanConfig extends MakeLinuxPackageConfig {
String displayName;
String packageName;
String maintainer;
bool includeBuildNumber;
int packageRelease;
int? installedSize;
List<String> licenses;
Expand Down Expand Up @@ -246,7 +249,7 @@ class MakePacmanConfig extends MakeLinuxPackageConfig {
}..removeWhere((key, value) => value == null),
'DESKTOP': {
'Type': 'Application',
'Version': appVersion.toString(),
'Version': includeBuildNumber ? appVersion.toString() : appBuildName,
'Name': displayName,
'GenericName': genericName,
'Icon': appBinaryName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ class MakeRPMConfig extends MakeConfig {
// Desktop file
required this.displayName,
this.startupNotify = true,
this.includeBuildNumber = true,
this.actions,
this.categories,
this.genericName,
Expand Down Expand Up @@ -43,6 +44,7 @@ class MakeRPMConfig extends MakeConfig {
packageName: json['package_name'] as String?,
displayName: json['display_name'] as String,
icon: json['icon'] as String?,
includeBuildNumber: json['include_build_number'] as bool? ?? true,
metainfo: json['metainfo'] as String?,
genericName: json['generic_name'] as String?,
startupNotify: json['startup_notify'] as bool?,
Expand Down Expand Up @@ -75,6 +77,7 @@ class MakeRPMConfig extends MakeConfig {

String? packageName;

bool includeBuildNumber;
String displayName;
String? icon;
String? metainfo;
Expand Down Expand Up @@ -116,7 +119,7 @@ class MakeRPMConfig extends MakeConfig {
'SPEC': {
'preamble': {
'Name': appName,
'Version': appVersion.toString(),
'Version': includeBuildNumber ? appVersion.toString() : appBuildName,
'Release':
"${appVersion.build.isNotEmpty ? appVersion.build.first : "1"}%{?dist}",
'Summary': summary ?? pubspec.description,
Expand Down Expand Up @@ -161,7 +164,7 @@ class MakeRPMConfig extends MakeConfig {
},
'DESKTOP': {
'Type': 'Application',
'Version': appVersion.toString(),
'Version': includeBuildNumber ? appVersion.toString() : appBuildName,
'Name': displayName,
'GenericName': genericName,
'Icon': appName,
Expand Down

0 comments on commit fc44798

Please sign in to comment.