From 386f08f6f82dab205395d6c2c96cdf6fbff178ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Brunner?= Date: Wed, 20 Nov 2024 09:51:03 +0100 Subject: [PATCH] fix --- tag_publish/cli.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/tag_publish/cli.py b/tag_publish/cli.py index 5894c9c..382f683 100644 --- a/tag_publish/cli.py +++ b/tag_publish/cli.py @@ -540,32 +540,25 @@ def _handle_helm_publish( versions[-1] = str(int(versions[-1]) + 1) version = ".".join(versions) - print("packages") for package in helm_config["packages"]: print(f"package: {package}") - print( - f'group: {package.get("group", tag_publish.configuration.HELM_PACKAGE_GROUP_DEFAULT)} == ' - f'{group}' - ) if package.get("group", tag_publish.configuration.HELM_PACKAGE_GROUP_DEFAULT) == group: - print( - f'version_type: {version_type} in ' - f'{helm_config.get("versions", tag_publish.configuration.HELM_VERSIONS_DEFAULT)}' - ) publish = version_type in helm_config.get( "versions", tag_publish.configuration.HELM_VERSIONS_DEFAULT ) - print(publish) + folder = package.get("folder", tag_publish.configuration.HELM_PACKAGE_FOLDER_DEFAULT) if publish: - folder = package.get("folder", tag_publish.configuration.HELM_PACKAGE_FOLDER_DEFAULT) if dry_run: print(f"Publishing '{folder}' to helm, skipping (dry run)") else: token = os.environ["GITHUB_TOKEN"] success &= tag_publish.publish.helm(folder, version, owner, repo, commit_sha, token) published_payload.append({"type": "helm", "folder": folder}) - elif dry_run: - print(f"Checking '{folder}' to helm, skipping (dry run)") + else: + print( + f"The folder '{folder}' will be published as helm on version types: " + f"{', '.join(helm_config['versions'])}" + ) return success