From d5709aa37cc429f8dd3276062532ddb2babf9149 Mon Sep 17 00:00:00 2001 From: Jyothish Atheendran Date: Wed, 27 Nov 2024 01:46:31 +0100 Subject: [PATCH 1/2] Enabled Proprer Changelog Syntax for RPM SPEC file --- .../lib/src/makers/rpm/make_rpm_config.dart | 7 ++++++- packages/flutter_app_packager/pubspec.yaml | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart b/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart index 87a8381c..506f0716 100644 --- a/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart +++ b/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart @@ -1,5 +1,5 @@ import 'dart:io'; - +import 'package:intl/intl.dart'; import 'package:flutter_app_packager/src/api/app_package_maker.dart'; class MakeRPMConfig extends MakeConfig { @@ -105,6 +105,10 @@ class MakeRPMConfig extends MakeConfig { @override Map toJson() { + final currentDate = DateTime.now(); + DateTime now = DateTime.now(); + String formattedDate = DateFormat('EEE MMM dd yyyy').format(now); + final rpmVersion = appVersion.toString(); return { 'SPEC': { 'preamble': { @@ -150,6 +154,7 @@ class MakeRPMConfig extends MakeConfig { 'inline-body': { '%defattr': '(-,root,root)', '%attr': '(4755, root, root) %{_datadir}/pixmaps/%{name}.png', + '%changelog': '\n* $formattedDate $packager <$packagerEmail> - $rpmVersion\n- $changelog', }, }, 'DESKTOP': { diff --git a/packages/flutter_app_packager/pubspec.yaml b/packages/flutter_app_packager/pubspec.yaml index e85cc294..5d240364 100644 --- a/packages/flutter_app_packager/pubspec.yaml +++ b/packages/flutter_app_packager/pubspec.yaml @@ -17,6 +17,7 @@ dependencies: pubspec_parse: ^1.1.0 shell_executor: ^0.1.6 yaml: ^3.1.0 + intl: ^0.20.0 dev_dependencies: dependency_validator: ^3.0.0 From 341703512b40b961a89482d7fab4b7aface26110 Mon Sep 17 00:00:00 2001 From: Jyothish Atheendran Date: Sun, 8 Dec 2024 13:00:21 +0100 Subject: [PATCH 2/2] Fix for changelog issue #236. Removed a duplicate variable from intial PR --- .../flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart b/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart index 506f0716..06c51ddb 100644 --- a/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart +++ b/packages/flutter_app_packager/lib/src/makers/rpm/make_rpm_config.dart @@ -105,7 +105,6 @@ class MakeRPMConfig extends MakeConfig { @override Map toJson() { - final currentDate = DateTime.now(); DateTime now = DateTime.now(); String formattedDate = DateFormat('EEE MMM dd yyyy').format(now); final rpmVersion = appVersion.toString();