Skip to content

Commit 0813b53

Browse files
committed
hotfix: rename ihp-sg13g2, replace - with _
Multiple dashes in a release name break `ls-remote` in every previous version of Volare.
1 parent 28e1a20 commit 0813b53

File tree

3 files changed

+16
-14
lines changed

3 files changed

+16
-14
lines changed

pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "volare"
3-
version = "0.20.3"
3+
version = "0.20.4"
44
description = "An PDK builder/version manager for PDKs in the open_pdks format"
55
authors = ["Efabless Corporation and Contributors <donn@efabless.com>"]
66
readme = "Readme.md"

volare/build/ihp-sg13g2.py renamed to volare/build/ihp_sg13g2.py

+12-10
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ def get_ihp(
4848
version,
4949
)
5050
repo = ihp_future.result()
51-
current_task = progress.add_task(
52-
"Updating submodules…", total=100
51+
current_task = progress.add_task("Updating submodules…", total=100)
52+
repo.init_submodule(
53+
callback=lambda x: progress.update(current_task, completed=x)
5354
)
54-
repo.init_submodule(callback=lambda x: progress.update(current_task, completed=x))
5555
repo_path = repo.path
5656
console.log(f"Done fetching {ihp_repo.name}.")
5757
else:
@@ -68,22 +68,24 @@ def get_ihp(
6868
def build_ihp(build_directory, ihp_path):
6969
# """Build"""
7070
try:
71-
shutil.rmtree(os.path.join(build_directory, "ihp-sg13g2"))
71+
shutil.rmtree(os.path.join(build_directory, "ihp_sg13g2"))
7272
except FileNotFoundError:
7373
pass
7474
shutil.copytree(
7575
os.path.join(ihp_path, "ihp-sg13g2"),
76-
os.path.join(build_directory, "ihp-sg13g2"),
77-
ignore=lambda dir, files: files if ".git" in os.path.split(dir) else [".git", ".DS_Store"]
76+
os.path.join(build_directory, "ihp_sg13g2"),
77+
ignore=lambda dir, files: (
78+
files if ".git" in os.path.split(dir) else [".git", ".DS_Store"]
79+
),
7880
)
7981

8082

8183
def install_ihp(build_directory, pdk_root, version):
8284
console = Console()
8385
with console.status("Adding build to list of installed versions…"):
84-
ihp_sg13g2_family = Family.by_name["ihp-sg13g2"]
86+
ihp_sg13g2_family = Family.by_name["ihp_sg13g2"]
8587

86-
version_directory = Version(version, "ihp-sg13g2").get_dir(pdk_root)
88+
version_directory = Version(version, "ihp_sg13g2").get_dir(pdk_root)
8789
if (
8890
os.path.exists(version_directory)
8991
and len(os.listdir(version_directory)) != 0
@@ -92,7 +94,7 @@ def install_ihp(build_directory, pdk_root, version):
9294
it = 0
9395
while os.path.exists(backup_path) and len(os.listdir(backup_path)) != 0:
9496
it += 1
95-
backup_path = Version(f"{version}.bk{it}", "ihp-sg13g2").get_dir(
97+
backup_path = Version(f"{version}.bk{it}", "ihp_sg13g2").get_dir(
9698
pdk_root
9799
)
98100
console.log(
@@ -130,7 +132,7 @@ def build(
130132
using_repos = {}
131133

132134
build_directory = os.path.join(
133-
get_volare_dir(pdk_root, "ihp-sg13g2"), "build", version
135+
get_volare_dir(pdk_root, "ihp_sg13g2"), "build", version
134136
)
135137
timestamp = datetime.now().strftime("build_ihp-sg13g2-%Y-%m-%d-%H-%M-%S")
136138
log_dir = os.path.join(build_directory, "logs", timestamp)

volare/families.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,9 @@ def resolve_libraries(
106106
],
107107
repo=opdks_repo,
108108
)
109-
Family.by_name["ihp-sg13g2"] = Family(
110-
name="ihp-sg13g2",
111-
variants=["ihp-sg13g2"],
109+
Family.by_name["ihp_sg13g2"] = Family(
110+
name="ihp_sg13g2",
111+
variants=["ihp_sg13g2"],
112112
all_libraries=[
113113
"sg13g2_io",
114114
"sg13g2_pr",

0 commit comments

Comments
 (0)