Skip to content

Commit

Permalink
hotfix: rename ihp-sg13g2, replace - with _
Browse files Browse the repository at this point in the history
Multiple dashes in a release name break `ls-remote` in every previous version of Volare.
  • Loading branch information
donn committed Jan 9, 2025
1 parent 28e1a20 commit 0813b53
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "volare"
version = "0.20.3"
version = "0.20.4"
description = "An PDK builder/version manager for PDKs in the open_pdks format"
authors = ["Efabless Corporation and Contributors <[email protected]>"]
readme = "Readme.md"
Expand Down
22 changes: 12 additions & 10 deletions volare/build/ihp-sg13g2.py → volare/build/ihp_sg13g2.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ def get_ihp(
version,
)
repo = ihp_future.result()
current_task = progress.add_task(
"Updating submodules…", total=100
current_task = progress.add_task("Updating submodules…", total=100)
repo.init_submodule(
callback=lambda x: progress.update(current_task, completed=x)
)
repo.init_submodule(callback=lambda x: progress.update(current_task, completed=x))
repo_path = repo.path
console.log(f"Done fetching {ihp_repo.name}.")
else:
Expand All @@ -68,22 +68,24 @@ def get_ihp(
def build_ihp(build_directory, ihp_path):
# """Build"""
try:
shutil.rmtree(os.path.join(build_directory, "ihp-sg13g2"))
shutil.rmtree(os.path.join(build_directory, "ihp_sg13g2"))
except FileNotFoundError:
pass
shutil.copytree(
os.path.join(ihp_path, "ihp-sg13g2"),
os.path.join(build_directory, "ihp-sg13g2"),
ignore=lambda dir, files: files if ".git" in os.path.split(dir) else [".git", ".DS_Store"]
os.path.join(build_directory, "ihp_sg13g2"),
ignore=lambda dir, files: (
files if ".git" in os.path.split(dir) else [".git", ".DS_Store"]
),
)


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

version_directory = Version(version, "ihp-sg13g2").get_dir(pdk_root)
version_directory = Version(version, "ihp_sg13g2").get_dir(pdk_root)
if (
os.path.exists(version_directory)
and len(os.listdir(version_directory)) != 0
Expand All @@ -92,7 +94,7 @@ def install_ihp(build_directory, pdk_root, version):
it = 0
while os.path.exists(backup_path) and len(os.listdir(backup_path)) != 0:
it += 1
backup_path = Version(f"{version}.bk{it}", "ihp-sg13g2").get_dir(
backup_path = Version(f"{version}.bk{it}", "ihp_sg13g2").get_dir(
pdk_root
)
console.log(
Expand Down Expand Up @@ -130,7 +132,7 @@ def build(
using_repos = {}

build_directory = os.path.join(
get_volare_dir(pdk_root, "ihp-sg13g2"), "build", version
get_volare_dir(pdk_root, "ihp_sg13g2"), "build", version
)
timestamp = datetime.now().strftime("build_ihp-sg13g2-%Y-%m-%d-%H-%M-%S")
log_dir = os.path.join(build_directory, "logs", timestamp)
Expand Down
6 changes: 3 additions & 3 deletions volare/families.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ def resolve_libraries(
],
repo=opdks_repo,
)
Family.by_name["ihp-sg13g2"] = Family(
name="ihp-sg13g2",
variants=["ihp-sg13g2"],
Family.by_name["ihp_sg13g2"] = Family(
name="ihp_sg13g2",
variants=["ihp_sg13g2"],
all_libraries=[
"sg13g2_io",
"sg13g2_pr",
Expand Down

0 comments on commit 0813b53

Please sign in to comment.