From 2d6e7fa8e58400ebd15ce05c8ad1197d6b8b9ca4 Mon Sep 17 00:00:00 2001 From: Alex Wolf Date: Wed, 2 Oct 2024 15:41:22 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix=20release=20for=20laminhub?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- laminci/__main__.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/laminci/__main__.py b/laminci/__main__.py index aaea4c0..94bc842 100644 --- a/laminci/__main__.py +++ b/laminci/__main__.py @@ -85,9 +85,9 @@ def publish_github_release( try: cwd = Path.cwd() if cwd is None else Path(cwd) # account for repo_name sometimes being a package - repo_name_standardized = repo_name.split("/")[1].replace("_", "-") + repo_name_standardized = repo_name.split("/")[1] if not repo_name_standardized == cwd.name: - raise ValueError(f"Don't match {repo_name_standardized} {cwd.name}") + raise ValueError(f"Don't match: {repo_name_standardized} != {cwd.name}") subprocess.run(["gh", "--version"], check=True, stdout=subprocess.PIPE, cwd=cwd) try: command = [ @@ -168,8 +168,10 @@ def main(): "ERROR: Did you forget to add the `--pypi` flag? A LICENSE file" " exists and I assume this is an open-source package." ) + repo_name = package_name.replace("_", "-") else: assert Path.cwd().name == "laminhub" + repo_name = "laminhub" if not (Path.cwd().parent / "laminhub-public").exists(): raise ValueError( "Please clone the laminhub-public repository into the same parent" @@ -208,7 +210,7 @@ def main(): ) publish_github_release( - repo_name=f"laminlabs/{package_name}", + repo_name=f"laminlabs/{repo_name}", version=version, release_name=f"Release {version}", body=f"See {changelog_link}",