doc-sync: strip point release from version before uploading

We create subdirectories for each major release, but not for point releases
so strip the suffix if it is present

(cherry picked from commit 59e6059513)
This commit is contained in:
Luca Boccassi 2024-09-10 17:37:04 +02:00 committed by Luca Boccassi
parent 7635d01869
commit abd44e2654

View File

@ -94,6 +94,8 @@ def get_latest_version():
def main(version, directory, www_target):
index_filename = os.path.join(directory, "index.json")
nav_filename = os.path.join(directory, "nav.js")
# The upload directory does not contain point release suffixes
version = re.sub(r"\..+$", "", version)
current_branch = subprocess.check_output(["git", "branch", "--show-current"], text=True).strip()