admin/server: use the 'release' branch as reference for latest release version number detection

- ref. https://github.com/shaarli/Shaarli/issues/1961
This commit is contained in:
nodiscc 2023-03-20 18:15:00 +01:00
parent 062698c123
commit 625235787e
No known key found for this signature in database
GPG key ID: 067FC4266A4B6909
2 changed files with 2 additions and 2 deletions

View file

@ -28,7 +28,7 @@ class ServerController extends ShaarliAdminController
$releaseUrl = ApplicationUtils::$GITHUB_URL . '/releases/';
if ($this->container->conf->get('updates.check_updates', true)) {
$latestVersion = 'v' . ApplicationUtils::getVersion(
ApplicationUtils::$GIT_RAW_URL . '/latest/' . ApplicationUtils::$VERSION_FILE
ApplicationUtils::$GIT_RAW_URL . '/release/' . ApplicationUtils::$VERSION_FILE
);
$releaseUrl .= 'tag/' . $latestVersion;
} else {

View file

@ -438,7 +438,7 @@ class LegacyUpdater
// Get latest branch major version digit
$latestVersion = ApplicationUtils::getLatestGitVersionCode(
'https://raw.githubusercontent.com/shaarli/Shaarli/latest/shaarli_version.php',
'https://raw.githubusercontent.com/shaarli/Shaarli/release/shaarli_version.php',
5
);
if (preg_match('/(\d+)\.\d+$/', $latestVersion, $matches) === false) {