Skip to content

Commit 4bc5861

Browse files
committed
implement major version check
#27
1 parent f1692e0 commit 4bc5861

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

app/Jobs/UpdateSite.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,16 @@ public function handle(): void
4444
return;
4545
}
4646

47+
// Do not make a major version update
48+
$majorVersionCms = (int) $healthResult->cms_version;
49+
$majorTargetVersion = (int) $this->targetVersion;
50+
51+
if ($majorVersionCms <> $majorTargetVersion) {
52+
Log::info("No major update for Site: " . $this->site->id);
53+
54+
return;
55+
}
56+
4757
// Store pre-update response code
4858
$this->preUpdateCode = $this->site->getFrontendStatus();
4959

0 commit comments

Comments
 (0)