upgrade version to 3.6.0-alpha-1

feature/assist-websocket
Apex Liu 2021-11-25 22:41:28 +08:00
parent 15e85d61ef
commit 6454bf0300
9 changed files with 80 additions and 24 deletions

View File

@ -159,8 +159,12 @@ class Builder:
self._update_ver_nsi(nsi_file, self.VER_TP_ASSIST)
def make_assist_macos_ver(self):
plist_file = os.path.join(env.root_path, 'client', 'tp_assist_macos', 'src', 'TP-Assist-Info.plist')
self._update_ver_plist(plist_file, self.VER_TP_ASSIST)
# plist_file = os.path.join(env.root_path, 'client', 'tp_assist_macos', 'src', 'TP-Assist-Info.plist')
# self._update_ver_plist(plist_file, self.VER_TP_ASSIST)
# Xcode 13.1, version string moved to file named "project.pbxproj".
pbxproj_file = os.path.join(env.root_path, 'client', 'tp_assist_macos', 'TP-Assist.xcodeproj', 'project.pbxproj')
self._update_ver_pbxproj(pbxproj_file, self.VER_TP_ASSIST)
ver_file = os.path.join(env.root_path, 'client', 'tp_assist_macos', 'src', 'csrc', 'ts_ver.h')
ver_content = '#ifndef __TS_ASSIST_VER_H__\n#define __TS_ASSIST_VER_H__\n\n#define TP_ASSIST_VER\tL"{}"\n\n#endif // __TS_ASSIST_VER_H__\n'.format(self.VER_TP_ASSIST)
@ -425,6 +429,58 @@ class Builder:
except IOError:
raise RuntimeError('can not process plist file.')
def _update_ver_pbxproj(self, pbxproj_file, ver):
""" update pbxproj file version info for macOS app."""
t_ver = ver.split('.')
if len(t_ver) < 3:
raise RuntimeError('Invalid version for .pbxproj file.')
ver_flags = ['MARKETING_VERSION', 'CURRENT_PROJECT_VERSION']
bOK = False
try:
f = codecs.open(pbxproj_file, 'r', 'utf8')
lines = f.readlines()
f.close()
for x in range(len(lines)):
line = lines[x]
is_ver_line = False
for flag in ver_flags:
if line.find(flag) != -1:
is_ver_line = True
break
if not is_ver_line:
continue
# e.g.:
# MARKETING_VERSION = 3.6.0;
# CURRENT_PROJECT_VERSION = 3.6.0;
ver_array = line.split(' = ')
if len(ver_array) != 2:
raise RuntimeError('Invalid .pbxproj file.')
_ver = ver_array[1].strip()[:-1].strip()
v = _ver.split(".")
if len(v) < 3:
raise RuntimeError('Invalid .pbxproj file.')
old_ver = '.'.join(v)
if old_ver == ver:
continue
lines[x] = '{flag} = {ver};\n'.format(flag=ver_array[0], ver=ver)
bOK = True
if bOK:
cc.v(' update {}...'.format(pbxproj_file))
wrcFile = codecs.open(pbxproj_file, 'w', 'utf8')
wrcFile.writelines(lines)
wrcFile.close()
except IOError:
raise RuntimeError('can not process plist file.')
def main():
if not env.init():

View File

@ -1,4 +1,4 @@
# -*- coding: utf8 -*-
VER_TP_SERVER = "3.5.6"
VER_TP_ASSIST = "3.5.6"
VER_TP_STATE = "rc6"
VER_TP_SERVER = "3.6.0"
VER_TP_ASSIST = "3.6.0"
VER_TP_STATE = "a1"

Binary file not shown.

View File

@ -1,6 +1,6 @@
#ifndef __TS_ASSIST_VER_H__
#define __TS_ASSIST_VER_H__
#define TP_ASSIST_VER L"3.5.6"
#define TP_ASSIST_VER L"3.6.0"
#endif // __TS_ASSIST_VER_H__

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,6 @@
#ifndef __TS_SERVER_VER_H__
#define __TS_SERVER_VER_H__
#define TP_SERVER_VER L"3.5.5"
#define TP_SERVER_VER L"3.6.0"
#endif // __TS_SERVER_VER_H__

View File

@ -1,4 +1,4 @@
# -*- coding: utf8 -*-
TP_SERVER_VER = "3.5.6"
TP_SERVER_VER = "3.6.0"
TP_ASSIST_REQUIRE_VER = "3.6.0"
TP_STATE_VER = "rc6"
TP_STATE_VER = "a1"

View File

@ -10,9 +10,9 @@ Minor: 次版本号。如果两个程序集的名称和主版本号相同,而
Revision: 修订号。主版本号和次版本号都相同但修订号不同的程序集应是完全可互换的。
这适用于修复以前发布的程序集中的错误或安全漏洞。
TP_SERVER 3.5.6 # 整个服务端打包的版本
TP_TPCORE 3.5.5 # 核心服务 tp_core 的版本
TP_SERVER 3.6.0 # 整个服务端打包的版本
TP_TPCORE 3.6.0 # 核心服务 tp_core 的版本
TP_TPWEB 3.1.0 # web服务 tp_web 的版本一般除非升级Python否则不会变化
TP_ASSIST 3.5.6 # 助手版本
TP_ASSIST_REQUIRE 3.5.5 # 适配的助手最低版本
TP_STATE rc6 # 版本状态,可以是 beta1rc2 等,用于打包文件名及部分界面。如果是 release 则忽略
TP_ASSIST 3.6.0 # 助手版本
TP_ASSIST_REQUIRE 3.6.0 # 适配的助手最低版本
TP_STATE a1 # 版本状态,可以是 beta1rc2 等,用于打包文件名及部分界面。如果是 release 则界面上不显示