Skip to content

Firefly III: a personal finances manager

Add a week's delay.

James Colea87e10f7349c
diff --git a/app/Services/FireflyIIIOrg/Update/GitHubUpdateRequest.php b/app/Services/FireflyIIIOrg/Update/GitHubUpdateRequest.php
index bdc1431021..8b990944b5 100644
--- a/app/Services/FireflyIIIOrg/Update/GitHubUpdateRequest.php
+++ b/app/Services/FireflyIIIOrg/Update/GitHubUpdateRequest.php
@@ -111,7 +111,7 @@ class GitHubUpdateRequest implements UpdateRequestInterface
private function filterReleases(array $releases): array
{
$return = [];
-
+ $weekAgo = now()->subWeek();
/** @var array $release */
foreach ($releases as $release) {
if ($release['published_at']->lte($this->currentBuild)) {
@@ -119,6 +119,11 @@ class GitHubUpdateRequest implements UpdateRequestInterface
continue;
}
+ // new version must be at least a week old.
+ if ($release['published_at']->gt($weekAgo)) {
+ Log::debug(sprintf('Skip too new version "%s"', $release['version']));
+ continue;
+ }
// if channel is stable, and version is "alpha", continue.
// if channel is stable, and version is "beta", continue.
// if channel is beta, and version is "alpha", continue.