Skip to content

Commit c13bab0

Browse files
committed
Always build codemeta.json to avoid it being deleted by the rsync
1 parent b1bde53 commit c13bab0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,17 @@
138138
shutil.copy("./LICENSE", "target/LICENSE")
139139
shutil.copy("./CHANGELOG.md", "target/CHANGELOG.md")
140140

141-
# If we have a PyPI release for the current version, complete the codemeta.json template
141+
# Complete the codemeta.json template
142142
try:
143-
with urlopen(f"https://pypi.org/pypi/openminds/{context['version']}/json") as handle:
143+
with urlopen(f"https://pypi.org/pypi/openminds/json") as handle:
144144
pypi_metadata = json.loads(handle.read())
145145
except HTTPError:
146146
pypi_metadata = None
147147

148148
if pypi_metadata:
149149
with open("pipeline/src/codemeta.json") as fp:
150150
codemeta = json.load(fp)
151-
codemeta["version"] = context["version"]
151+
codemeta["version"] = pypi_metadata["info"]["version"]
152152
for item in pypi_metadata["urls"]:
153153
if item["packagetype"] == "sdist":
154154
codemeta["downloadUrl"] = item["url"]

0 commit comments

Comments
 (0)