Skip to content

Commit 4e67f3e

Browse files
committed
[增加] 程序版本的参数
1 parent c1fb9ca commit 4e67f3e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

Editor/Builder.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,10 @@ private static void BuildParamsParse()
142142
{
143143
_builderOptions.BundleId = commandLineArgs[index + 1];
144144
}
145+
else if (commandLineArg == "-AppVersion")
146+
{
147+
_builderOptions.AppVersion = commandLineArgs[index + 1];
148+
}
145149
}
146150

147151
if (_builderOptions.ExecuteMethod.IsNullOrWhiteSpace())
@@ -167,6 +171,11 @@ private static void BuildParamsParse()
167171
{
168172
PlayerSettings.applicationIdentifier = _builderOptions.BundleId.Trim();
169173
}
174+
175+
if (!_builderOptions.AppVersion.IsNullOrWhiteSpace())
176+
{
177+
PlayerSettings.bundleVersion = _builderOptions.AppVersion.Trim();
178+
}
170179
}
171180

172181
public static void BuildDouYin()

Editor/BuilderOptions.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ internal sealed class BuilderOptions
5454
/// </summary>
5555
public string BundleId { get; set; } = string.Empty;
5656

57+
/// <summary>
58+
/// 程序版本号,默认值为空,如果为空则使用项目的程序版本号
59+
/// </summary>
60+
public string AppVersion { get; set; } = string.Empty;
61+
5762
/// <summary>
5863
/// 是否上传日志文件
5964
/// </summary>

0 commit comments

Comments
 (0)