Skip to content

Commit

Permalink
V1.0.7 (#8)
Browse files Browse the repository at this point in the history
* version code는 label 없을 때만 증가

* pull origin main

* label 수정으로 trigger 되도록 수정

* add log

* test
  • Loading branch information
peter-j0y authored Sep 24, 2024
1 parent af9b3b6 commit 088081d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/control_multi_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,19 @@ 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:
bump_version(VersionCategory.NONE , arg['version_code_variable_name'], arg['version_name_variable_name'], version_code, major_version, minor_version, patch_version, revision_version)

# 버전 올리는 함수
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:
Expand Down

0 comments on commit 088081d

Please sign in to comment.