Skip to content

Commit

Permalink
fix reset of version number for windows platform
Browse files Browse the repository at this point in the history
  • Loading branch information
BradyAJohnston committed Jun 13, 2024
1 parent b7b5b32 commit 927d1f9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import zipfile
from dataclasses import dataclass
from typing import List, Union
import re

import tomlkit

Expand Down Expand Up @@ -91,6 +92,7 @@ def update_toml_whls(platform: Platform):
manifest_str = (
tomlkit.dumps(manifest)
.replace('["', '[\n\t"')
.replace("\\\\", "/")
.replace('", "', '",\n\t"')
.replace('"]', '",\n]')
)
Expand All @@ -117,8 +119,10 @@ def zip_extension(platform: Platform) -> None:
with open(toml_path, "r") as file:
manifest = tomlkit.parse(file.read())

# Get the version number
version = manifest["version"].split("-")[0]
# Get the version number, which would have the platform appended onto it
# for bundling for the blender extension platform and remove the platform to
# keep just the version number
version = re.search(r"\d+\.\d+\.\d+", manifest["version"]).group()

zip_file_name = f"molecularnodes-{version}-{platform.metadata}.zip"

Expand Down

0 comments on commit 927d1f9

Please sign in to comment.