Skip to content

Commit

Permalink
feat(config): move EOL date to config.php instead of boolean
Browse files Browse the repository at this point in the history
EOL flag is now computed when serving response

Signed-off-by: Benjamin Gaussorgues <[email protected]>
  • Loading branch information
Altahrim committed Jun 28, 2024
1 parent 54272bf commit a65662f
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 78 deletions.
5 changes: 2 additions & 3 deletions build/config_builder
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,12 @@ foreach ($releases as $releaseName => $info) {
preg_match('/(\d+)\.(\d+).(\d+)(?: (.+))?/A', $releaseName, $matches);
[, $major, $minor, $patch] = $matches;
$stability = getStabilityFromName($releaseName);
$isEol = isEol($releaseName, $majorVersions[$major]);
$generatedConfig[$stability][$major]['100'] = [
'latest' => $releaseName,
'internalVersion' => $info['internalVersion'],
'downloadUrl' => buildDownloadUrl($releaseName, $info, $majorVersions[$major]),
'web' => sprintf($docUrl, $major),
'eol' => $isEol,
'eol' => $majorVersions[$major]['eol'] ?? '',
'minPHPVersion' => $majorVersions[$major]['minPHP'] ?? '',
'signature' => isset($info['signature']) ? wordwrap($info['signature'], 64, cut_long_words: true) : '',
];
Expand Down Expand Up @@ -89,7 +88,7 @@ foreach ($majorVersions as $majorVersion => $info) {
$generatedConfig['daily'][$majorVersion] = [
'downloadUrl' => sprintf('https://download.nextcloud.com/server/daily/latest-%s.zip', $maxMajor === $majorVersion ? 'master' : 'stable'.$majorVersion),
'web' => sprintf($docUrl, $maxMajor === $majorVersion ? 'latest' : $majorVersion),
'eol' => isset($info['eol']) ? ($info['eol'] <= $now) : false,
'eol' => $info['eol'] ?? '',
'minPHPVersion' => $info['minPHP'] ?? '7.2',
];
}
Expand Down
Loading

0 comments on commit a65662f

Please sign in to comment.