添加记录git hash的方法
parent
bba99635aa
commit
421b2e7a84
|
|
@ -158,6 +158,21 @@ def generateLevelIdListByGitLog():
|
||||||
print(f'资源修改列表:{str(_levelModifiedIdList_)}')
|
print(f'资源修改列表:{str(_levelModifiedIdList_)}')
|
||||||
config.notification_helper.append_msg(f"构建资源列表: {str(_levelModifiedIdList_)}")
|
config.notification_helper.append_msg(f"构建资源列表: {str(_levelModifiedIdList_)}")
|
||||||
|
|
||||||
|
def update_new_git_hash():
|
||||||
|
if opts.old_hash != '' and opts.new_hash != '':
|
||||||
|
current_commit_hash = opts.old_hash
|
||||||
|
new_commit_hash = opts.new_hash
|
||||||
|
else:
|
||||||
|
current_commit_hash = getCurrentGitHash()
|
||||||
|
new_commit_hash = getNewGitHash()
|
||||||
|
if new_commit_hash != '' and new_commit_hash != current_commit_hash:
|
||||||
|
writeGitCommitLog(new_commit_hash)
|
||||||
|
recordNewGitHash(new_commit_hash)
|
||||||
|
config.notification_helper.append_msg(
|
||||||
|
f"[step] update git hash success, old hash:{current_commit_hash}, new hash:{new_commit_hash}")
|
||||||
|
else:
|
||||||
|
config.notification_helper.append_msg("[Error] current_commit_hash is empty")
|
||||||
|
|
||||||
def build_package(opts, modify_files):
|
def build_package(opts, modify_files):
|
||||||
"""
|
"""
|
||||||
打资源包
|
打资源包
|
||||||
|
|
@ -425,6 +440,7 @@ if __name__ == '__main__':
|
||||||
tmBuildPackage2 = time.time()
|
tmBuildPackage2 = time.time()
|
||||||
print(f"{len(modify_files)}个资源, unity打包耗时:{tmBuildPackage2 - tmBuildPackage1}")
|
print(f"{len(modify_files)}个资源, unity打包耗时:{tmBuildPackage2 - tmBuildPackage1}")
|
||||||
if is_build_success and is_upload:
|
if is_build_success and is_upload:
|
||||||
|
update_new_git_hash()
|
||||||
print(f"开始上传ab包到firebase")
|
print(f"开始上传ab包到firebase")
|
||||||
storage_path = "Bundles/{}".format(opts.platform)
|
storage_path = "Bundles/{}".format(opts.platform)
|
||||||
# 上传ab包到firebase
|
# 上传ab包到firebase
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue