Skip to content

Commit

Permalink
fixup! feat(config): introduce configuration builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Altahrim committed May 27, 2024
1 parent 7d8f66f commit 11aaab6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions build/config_builder
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,20 @@ foreach ($releases as $releaseName => $info) {
];

// Check if we can upgrade from a previous major version
$previousMajor = $major - 1;
$deployPercent = $info['deploy'] ?? 100;
if (isset($latestReleases[$stability][$major - 1])) {
$upgradeFrom = $latestReleases[$stability][$major - 1];
if (isset($latestReleases[$stability][$previousMajor])) {
$upgradeFrom = $latestReleases[$stability][$previousMajor];
$generatedConfig[$stability][$upgradeFrom][$deployPercent] = $generatedConfig[$stability][$major]['100'];
} elseif (isset($latestReleases['stable'][$major -1])) {
$upgradeFrom = $latestReleases['stable'][$major - 1];
$upgradeFrom = $latestReleases['stable'][$previousMajor];
$generatedConfig[$stability][$upgradeFrom][$deployPercent] = $generatedConfig[$stability][$major]['100'];
}

// For stable versions, check if we can upgrade from a beta version
if ($stability === 'stable') {
if (isset($latestReleases['beta'][$major - 1])) {
$upgradeFrom = $latestReleases[$stability][$major - 1];
if (isset($latestReleases['beta'][$previousMajor])) {
$upgradeFrom = $latestReleases['beta'][$previousMajor];
$generatedConfig['beta'][$upgradeFrom][100] = $generatedConfig[$stability][$major]['100'];
}
}
Expand Down
2 changes: 1 addition & 1 deletion config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@
],
],
'beta' => [
'27.1.9.1' => [
'27.1.10.0' => [
100 => [
'latest' => '28.0.6',
'internalVersion' => '28.0.6.1',
Expand Down

0 comments on commit 11aaab6

Please sign in to comment.