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
This commit is contained in:
Luca Boccassi 2024-09-10 17:37:04 +02:00 committed by Zbigniew Jędrzejewski-Szmek
parent d794c10d96
commit 59e6059513

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()