修改hash文件名称,区分为安卓iOS两种

main
ZhuoZhou 2025-07-04 10:41:06 +08:00
parent 2c0598d7ff
commit 542df4bfbd
1 changed files with 4 additions and 3 deletions

View File

@ -60,6 +60,7 @@ def check_dir(path):
def isGitCommitFileExist(): def isGitCommitFileExist():
print(f'文件是否存在 {os.path.exists(opts.git_commit_hash_file)}')
return os.path.exists(opts.git_commit_hash_file) return os.path.exists(opts.git_commit_hash_file)
def writeGitCommitLog(git_log_hash): def writeGitCommitLog(git_log_hash):
@ -246,7 +247,7 @@ if __name__ == '__main__':
# parser.add_option("-b", "--buildtype", dest="buildtype", help=('打包类型, 选项: buildin/buildplayer/buildbundle')) # parser.add_option("-b", "--buildtype", dest="buildtype", help=('打包类型, 选项: buildin/buildplayer/buildbundle'))
# parser.add_option("-g", "--aab", dest="aab", help=('是否为上传Google Play的aab包')) # parser.add_option("-g", "--aab", dest="aab", help=('是否为上传Google Play的aab包'))
parser.add_option("-m", "--mode", dest="mode", help=('打包模式, 选项: Release/Debug')) parser.add_option("-m", "--mode", dest="mode", help=('打包模式, 选项: Release/Debug'))
parser.add_option("-p", "--platform", dest="platform", help=('打包平台 选项: android/ios/webgl')) parser.add_option("-p", "--platform", dest="platform", help=('打包平台 选项: Android/iOS'))
# parser.add_option("-u", "--unityexe", dest="unityexe", help=('Unity可执行文件')) # parser.add_option("-u", "--unityexe", dest="unityexe", help=('Unity可执行文件'))
# parser.add_option("-a", "--assets", dest="assets", help=('美术资源路径')) # parser.add_option("-a", "--assets", dest="assets", help=('美术资源路径'))
# parser.add_option("-r", "--resources", dest="resources", help=('导出资源路径')) # parser.add_option("-r", "--resources", dest="resources", help=('导出资源路径'))
@ -266,8 +267,8 @@ if __name__ == '__main__':
opts.assets = "/Volumes/Predator/find-object/find-object-art" opts.assets = "/Volumes/Predator/find-object/find-object-art"
opts.resources = "/Volumes/Predator/find-object/find-object-bundle-resource" opts.resources = "/Volumes/Predator/find-object/find-object-bundle-resource"
opts.workspace_path = config.machine_env_config.CD_MAC_STUDIO.value['workspace_path'] opts.workspace_path = config.machine_env_config.CD_MAC_STUDIO.value['workspace_path']
opts.git_commit_hash_file = os.path.join(opts.workspace_path, 'find_object_git_commit_hash.txt') opts.git_commit_hash_file = os.path.join(opts.workspace_path, f'find_object_git_commit_hash_{opts.platform}.txt')
opts.git_hash_change_record_file = os.path.join(opts.workspace_path, 'find_object_git_hash_change_record.txt') opts.git_hash_change_record_file = os.path.join(opts.workspace_path, f'find_object_git_hash_change_record_{opts.platform}.txt')
if opts.new_hash is None or opts.new_hash == 'none' or opts.new_hash == '_': if opts.new_hash is None or opts.new_hash == 'none' or opts.new_hash == '_':
opts.new_hash = '' opts.new_hash = ''