From 5eb66ba1d438ddb87bedec57c80d1fbbfd3b95a2 Mon Sep 17 00:00:00 2001 From: robmllze <86869208+robmllze@users.noreply.github.com> Date: Mon, 11 Nov 2024 22:41:57 +1100 Subject: [PATCH] +chore: Update CI/CD script --- .github/scripts/update_changelog.dart | 17 +++++++++++------ pubspec.yaml | 2 +- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/scripts/update_changelog.dart b/.github/scripts/update_changelog.dart index e213ba2..e6231e5 100644 --- a/.github/scripts/update_changelog.dart +++ b/.github/scripts/update_changelog.dart @@ -56,11 +56,15 @@ Set<_VersionSection> extractSections(String contents) { final results = <_VersionSection>{}; for (var i = 0; i < allVersionMatches.length; i++) { final start = allVersionMatches[i].end; - final end = i + 1 < allVersionMatches.length ? allVersionMatches[i + 1].start : contents.length; + final end = i + 1 < allVersionMatches.length + ? allVersionMatches[i + 1].start + : contents.length; final sectionContents = contents.substring(start, end).trim(); - final lines = sectionContents.split('\n').where((line) => line.isNotEmpty).toList(); - final version = - allVersionMatches[i].group(0)!.substring(4, allVersionMatches[i].group(0)!.length - 1); + final lines = + sectionContents.split('\n').where((line) => line.isNotEmpty).toList(); + final version = allVersionMatches[i] + .group(0)! + .substring(4, allVersionMatches[i].group(0)!.length - 1); var releasedAt = DateTime.now().toUtc(); final updates = {}; final old = lines @@ -136,7 +140,8 @@ int compareVersions(String version1, String version2) { List parseVersion(String version) { // Split by the '+' first to handle the build number final parts = version.split('+'); - final versionParts = parts[0].split('.').map(int.tryParse).map((e) => e ?? 0).toList(); + final versionParts = + parts[0].split('.').map(int.tryParse).map((e) => e ?? 0).toList(); // Add the build number as the last part (if it exists) if (parts.length > 1) { versionParts.add(int.tryParse(parts[1]) ?? 0); @@ -154,4 +159,4 @@ int compareVersions(String version1, String version2) { if (part1 < part2) return -1; } return 0; -} \ No newline at end of file +} diff --git a/pubspec.yaml b/pubspec.yaml index 653764c..f69f5d2 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -12,7 +12,7 @@ name: df_bijective_uuid_mapper description: A package providing bijective UUID mapping for secure and efficienct lookups. -version: 0.1.3 +version: 0.1.4 repository: https://github.com/robmllze/df_bijective_uuid_mapper funding: - https://www.buymeacoffee.com/robmllze