feat: readoorDict 打包按版本轨道替换 IPA 版本号与构建号
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
11f4035da7
commit
311234bd74
@@ -145,11 +145,17 @@ def _dict_build(tmp_path):
|
||||
macro = tmp_path / "readoor" / "BookShelf" / "Classes" / "Macro" / "STSConstantsMacro.h"
|
||||
macro.parent.mkdir(parents=True)
|
||||
macro.write_text(_DICT_MACRO, encoding="utf-8")
|
||||
project = tmp_path / "readoor.xcodeproj"
|
||||
project.mkdir()
|
||||
(project / "project.pbxproj").write_text(
|
||||
"\t\t\t\tMARKETING_VERSION = 2.192.3;\n\t\t\t\tCURRENT_PROJECT_VERSION = 2.192.3;\n", encoding="utf-8"
|
||||
)
|
||||
return macro
|
||||
|
||||
|
||||
def _dict_config(**extra):
|
||||
return {"SCHEME": "readoorDict", "VERSION": "2.0.0", "SERVER": "词典测试", "APPID": "1593413622",
|
||||
return {"SCHEME": "readoorDict", "VERSION": "2.0.0", "BUILD_VERSION": "2.0.0.3",
|
||||
"SERVER": "词典测试", "APPID": "1593413622",
|
||||
"NO_CERT": True, "BUILD_TYPE": "Ad_Hoc", **extra}
|
||||
|
||||
|
||||
@@ -159,6 +165,10 @@ def test_dict_env_macros_replaced_only_in_targettype_2(tmp_path):
|
||||
content = macro.read_text()
|
||||
|
||||
assert '#define SOURCE_VERSION @"2.0.0"' in content
|
||||
pbxproj = (tmp_path / "readoor.xcodeproj" / "project.pbxproj").read_text()
|
||||
assert "MARKETING_VERSION = 2.0.0;" in pbxproj
|
||||
assert "CURRENT_PROJECT_VERSION = 2.0.0.3;" in pbxproj
|
||||
assert "2.192.3" not in pbxproj
|
||||
assert '#define APPID @"1593413622"' in content
|
||||
assert '#define SERVERURL @"http://api-stage3/"' in content
|
||||
assert '#define LOGSERVERURL @"http://log-dev/"' in content
|
||||
|
||||
Reference in New Issue
Block a user