From 46a00836df7b8818a8c08546cb90a8bc4e03ab76 Mon Sep 17 00:00:00 2001 From: Imran Remtulla Date: Fri, 7 Apr 2023 22:10:55 -0400 Subject: [PATCH] Bugfix: GitHub/Codeberg fallback + no-prerel fail --- lib/app_sources/codeberg.dart | 5 +++-- lib/app_sources/github.dart | 5 +++-- lib/main.dart | 2 +- pubspec.yaml | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/lib/app_sources/codeberg.dart b/lib/app_sources/codeberg.dart index 32ecad0..5787485 100644 --- a/lib/app_sources/codeberg.dart +++ b/lib/app_sources/codeberg.dart @@ -81,10 +81,11 @@ class Codeberg extends AppSource { []; dynamic targetRelease; - + var prerrelsSkipped = 0; for (int i = 0; i < releases.length; i++) { - if (!fallbackToOlderReleases && i > 0) break; + if (!fallbackToOlderReleases && i > prerrelsSkipped) break; if (!includePrereleases && releases[i]['prerelease'] == true) { + prerrelsSkipped++; continue; } if (releases[i]['draft'] == true) { diff --git a/lib/app_sources/github.dart b/lib/app_sources/github.dart index a7d8a0e..4741fd4 100644 --- a/lib/app_sources/github.dart +++ b/lib/app_sources/github.dart @@ -127,10 +127,11 @@ class GitHub extends AppSource { []; dynamic targetRelease; - + var prerrelsSkipped = 0; for (int i = 0; i < releases.length; i++) { - if (!fallbackToOlderReleases && i > 0) break; + if (!fallbackToOlderReleases && i > prerrelsSkipped) break; if (!includePrereleases && releases[i]['prerelease'] == true) { + prerrelsSkipped++; continue; } var nameToFilter = releases[i]['name'] as String?; diff --git a/lib/main.dart b/lib/main.dart index c64b04f..3ce2b61 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -21,7 +21,7 @@ import 'package:easy_localization/src/easy_localization_controller.dart'; // ignore: implementation_imports import 'package:easy_localization/src/localization.dart'; -const String currentVersion = '0.11.28'; +const String currentVersion = '0.11.29'; const String currentReleaseTag = 'v$currentVersion-beta'; // KEEP THIS IN SYNC WITH GITHUB RELEASES diff --git a/pubspec.yaml b/pubspec.yaml index 160c2da..9c5f555 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.11.28+150 # When changing this, update the tag in main() accordingly +version: 0.11.29+151 # When changing this, update the tag in main() accordingly environment: sdk: '>=2.18.2 <3.0.0'