From 088081d6822ca162a13e5b65d6223b8acaaae380 Mon Sep 17 00:00:00 2001 From: Seungmin <39687846+peter-j0y@users.noreply.github.com> Date: Tue, 24 Sep 2024 14:36:51 +0900 Subject: [PATCH] V1.0.7 (#8) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * version code는 label 없을 때만 증가 * pull origin main * label 수정으로 trigger 되도록 수정 * add log * test --- src/control_multi_version.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/control_multi_version.py b/src/control_multi_version.py index 4330f6b..9b5074d 100644 --- a/src/control_multi_version.py +++ b/src/control_multi_version.py @@ -87,10 +87,11 @@ def update_version(arg, label_list): major_version, minor_version, patch_version, revision_version = map(int, arg['version_name'].split('.')) isBumpLabelNotExist = True + for version_type in list(VersionCategory): print(f'bump-{version_type.name.lower()}') if f'bump-{version_type.name.lower()}' in label_list: - isBumpLabelExist = False + isBumpLabelNotExist = False bump_version(version_type, arg['version_code_variable_name'], arg['version_name_variable_name'], version_code, major_version, minor_version, patch_version, revision_version) if isBumpLabelNotExist: @@ -98,7 +99,7 @@ def update_version(arg, label_list): # 버전 올리는 함수 def bump_version(version_category, vc_variable_name, vn_variable_name, version_code, major_version, minor_version, patch_version, revision_version) : - print(f"Current version : {major_version}.{minor_version}.{patch_version}.{revision_version}") + print(f"Current version : {major_version}.{minor_version}.{patch_version}.{revision_version}, version category : {version_category}") env_file = os.getenv('GITHUB_ENV') with open(env_file, "a") as my_file: