From 4f60fd147c741a60b0686d1cf621d3dc6905c11f Mon Sep 17 00:00:00 2001 From: peter-j0y Date: Tue, 24 Sep 2024 10:02:00 +0900 Subject: [PATCH 1/4] =?UTF-8?q?version=20code=EB=8A=94=20label=20=EC=97=86?= =?UTF-8?q?=EC=9D=84=20=EB=95=8C=EB=A7=8C=20=EC=A6=9D=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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 27764bd..c1b1c9a 100644 --- a/src/control_multi_version.py +++ b/src/control_multi_version.py @@ -97,8 +97,9 @@ def bump_version(version_category, vc_variable_name, vn_variable_name, version_c my_file.write(f"CURRENT_VERSION_NAME={major_version}.{minor_version}.{patch_version}.{revision_version}\n") my_file.write(f"CURRENT_VERSION_CODE={version_code}\n") - # version_code는 항상 증가 - version_code += 1 + # bump label 없는 경우에만 version code 증가 + if (version_category is VersionCategory.NONE): + version_code += 1 if version_category is VersionCategory.REVISION: revision_version += 1 From 4825a64cf69a3e7ea34d539e7f5a95347e8692f8 Mon Sep 17 00:00:00 2001 From: peter-j0y Date: Tue, 24 Sep 2024 10:05:22 +0900 Subject: [PATCH 2/4] pull origin main --- src/control_multi_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/control_multi_version.py b/src/control_multi_version.py index b36c634..056a488 100644 --- a/src/control_multi_version.py +++ b/src/control_multi_version.py @@ -89,7 +89,7 @@ def update_version(arg, label_list): isBumpLabelNotExist = True for version_type in list(VersionCategory): if f'bump-{version_type.name.lower()}' in label_list: - isBumpLabelExist = false + isBumpLabelExist = 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: From 48aca430ff28fda4f692518f85993a9829e28150 Mon Sep 17 00:00:00 2001 From: peter-j0y Date: Tue, 24 Sep 2024 10:24:02 +0900 Subject: [PATCH 3/4] =?UTF-8?q?label=20=EC=88=98=EC=A0=95=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20trigger=20=EB=90=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/test_action.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/test_action.yaml b/.github/workflows/test_action.yaml index ef649c4..2166d4a 100644 --- a/.github/workflows/test_action.yaml +++ b/.github/workflows/test_action.yaml @@ -2,6 +2,7 @@ name: Test Action on: pull_request: branches: [ "main" ] + types: [ opened, labeled ] jobs: get-num-square: From 8366e0194aa97c201f7a6496ec9b8ad27c7e9df2 Mon Sep 17 00:00:00 2001 From: peter-j0y Date: Tue, 24 Sep 2024 10:30:00 +0900 Subject: [PATCH 4/4] add log --- src/control_multi_version.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/control_multi_version.py b/src/control_multi_version.py index 056a488..4330f6b 100644 --- a/src/control_multi_version.py +++ b/src/control_multi_version.py @@ -88,6 +88,7 @@ def update_version(arg, label_list): 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 bump_version(version_type, arg['version_code_variable_name'], arg['version_name_variable_name'], version_code, major_version, minor_version, patch_version, revision_version)