From 062698c123451670432eb512c1e815d29f800f80 Mon Sep 17 00:00:00 2001 From: nodiscc Date: Mon, 20 Mar 2023 18:08:02 +0100 Subject: [PATCH 1/2] doc: update release procedure (merge the latest release to the release branch) - ref. https://github.com/shaarli/Shaarli/pull/1959 --- doc/md/dev/Release-Shaarli.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/md/dev/Release-Shaarli.md b/doc/md/dev/Release-Shaarli.md index 9440c2fb2..c56654c9a 100644 --- a/doc/md/dev/Release-Shaarli.md +++ b/doc/md/dev/Release-Shaarli.md @@ -139,16 +139,16 @@ make release_archive This will create `shaarli-v0.x.y-full.tar`, `shaarli-v0.x.y-full.zip`. These archives need to be manually uploaded on the previously created GitHub [release](https://github.com/shaarli/Shaarli/releases). -### Update the `latest` branch +### Update the `release` branch ```bash -# checkout the 'latest' branch -git checkout latest +# checkout the 'release' branch +git checkout release # merge changes from your newly published release branch git merge v0.x.y # fix eventual conflicts with git mergetool... # run tests make test # push the latest branch -git push upstream latest +git push upstream release ``` From 625235787e88ba5db4b45bb92effd91c0b6e212b Mon Sep 17 00:00:00 2001 From: nodiscc Date: Mon, 20 Mar 2023 18:15:00 +0100 Subject: [PATCH 2/2] admin/server: use the 'release' branch as reference for latest release version number detection - ref. https://github.com/shaarli/Shaarli/issues/1961 --- application/front/controller/admin/ServerController.php | 2 +- application/legacy/LegacyUpdater.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/application/front/controller/admin/ServerController.php b/application/front/controller/admin/ServerController.php index 4b74f4a94..9be5ea772 100644 --- a/application/front/controller/admin/ServerController.php +++ b/application/front/controller/admin/ServerController.php @@ -28,7 +28,7 @@ public function index(Request $request, Response $response): Response $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 { diff --git a/application/legacy/LegacyUpdater.php b/application/legacy/LegacyUpdater.php index 9bda54b8d..d457c5438 100644 --- a/application/legacy/LegacyUpdater.php +++ b/application/legacy/LegacyUpdater.php @@ -438,7 +438,7 @@ public function updateMethodCheckUpdateRemoteBranch() // 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) {