Skip to content

Commit

Permalink
+chore: Update CI/CD script
Browse files Browse the repository at this point in the history
  • Loading branch information
robmllze committed Nov 11, 2024
1 parent e00d803 commit 5eb66ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
17 changes: 11 additions & 6 deletions .github/scripts/update_changelog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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 = <String>{};
final old = lines
Expand Down Expand Up @@ -136,7 +140,8 @@ int compareVersions(String version1, String version2) {
List<int> 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);
Expand All @@ -154,4 +159,4 @@ int compareVersions(String version1, String version2) {
if (part1 < part2) return -1;
}
return 0;
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5eb66ba

Please sign in to comment.