You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2024/08/13 11:09:11 UTC

(opendal) branch Xuanwo-patch-1 created (now 6b1d57e12f)

This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a change to branch Xuanwo-patch-1
in repository https://gitbox.apache.org/repos/asf/opendal.git


      at 6b1d57e12f docs: Fix version detect in website

This branch includes the following new commits:

     new 6b1d57e12f docs: Fix version detect in website

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(opendal) 01/01: docs: Fix version detect in website

Posted by xu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch Xuanwo-patch-1
in repository https://gitbox.apache.org/repos/asf/opendal.git

commit 6b1d57e12ffa6b53a1d4bcc368ad3e2087df182e
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Tue Aug 13 19:09:07 2024 +0800

    docs: Fix version detect in website
---
 website/docusaurus.config.js | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js
index 2582676023..4153969342 100644
--- a/website/docusaurus.config.js
+++ b/website/docusaurus.config.js
@@ -42,11 +42,13 @@ const config = {
     version: (function () {
       if (websiteStaging && process.env.GITHUB_REF_TYPE === 'tag') {
         const refName = process.env.GITHUB_REF_NAME;
-        const version = semver.parse(refName, {}, true);
-        return `${version.major}.${version.minor}.${version.patch}`;
+        if refName.startsWith("v") {
+          const version = semver.parse(refName, {}, true);
+          return `${version.major}.${version.minor}.${version.patch}`;
+        }
       }
 
-      const refName = exec("git describe --tags --abbrev=0 --exclude '*rc*'").toString();
+      const refName = exec("git describe --tags --abbrev=0 --match 'v*'").toString();
       const version = semver.parse(refName, {}, true);
       return `${version.major}.${version.minor}.${version.patch}`;
     })()