@@ -56,11 +56,15 @@ Set<_VersionSection> extractSections(String contents) {
5656 final results = < _VersionSection > {};
5757 for (var i = 0 ; i < allVersionMatches.length; i++ ) {
5858 final start = allVersionMatches[i].end;
59- final end = i + 1 < allVersionMatches.length ? allVersionMatches[i + 1 ].start : contents.length;
59+ final end = i + 1 < allVersionMatches.length
60+ ? allVersionMatches[i + 1 ].start
61+ : contents.length;
6062 final sectionContents = contents.substring (start, end).trim ();
61- final lines = sectionContents.split ('\n ' ).where ((line) => line.isNotEmpty).toList ();
62- final version =
63- allVersionMatches[i].group (0 )! .substring (4 , allVersionMatches[i].group (0 )! .length - 1 );
63+ final lines =
64+ sectionContents.split ('\n ' ).where ((line) => line.isNotEmpty).toList ();
65+ final version = allVersionMatches[i]
66+ .group (0 )!
67+ .substring (4 , allVersionMatches[i].group (0 )! .length - 1 );
6468 var releasedAt = DateTime .now ().toUtc ();
6569 final updates = < String > {};
6670 final old = lines
@@ -136,7 +140,8 @@ int compareVersions(String version1, String version2) {
136140 List <int > parseVersion (String version) {
137141 // Split by the '+' first to handle the build number
138142 final parts = version.split ('+' );
139- final versionParts = parts[0 ].split ('.' ).map (int .tryParse).map ((e) => e ?? 0 ).toList ();
143+ final versionParts =
144+ parts[0 ].split ('.' ).map (int .tryParse).map ((e) => e ?? 0 ).toList ();
140145 // Add the build number as the last part (if it exists)
141146 if (parts.length > 1 ) {
142147 versionParts.add (int .tryParse (parts[1 ]) ?? 0 );
@@ -154,4 +159,4 @@ int compareVersions(String version1, String version2) {
154159 if (part1 < part2) return - 1 ;
155160 }
156161 return 0 ;
157- }
162+ }
0 commit comments