【打包工具】添加根据分支判断要打的包,添加灵动商务服配置
parent
562b57db73
commit
0138a9576f
|
@ -9,11 +9,18 @@ public class AutoPack : EditorWindow
|
||||||
{
|
{
|
||||||
static string[][] PackConfig = new string[][]
|
static string[][] PackConfig = new string[][]
|
||||||
{
|
{
|
||||||
new string[]{ "C轮v2", "Logo_gm_nosdk", "TCX_TEST_C_V2"},
|
// 专服
|
||||||
new string[]{ "灵动专服-测试", "Logo_gn_zf_test", "MHT_GN_ZF_TEST" },
|
new string[]{ "C轮v2", "Logo_gm_nosdk", "TCX_TEST_C_V2", "china/zf_test"},
|
||||||
new string[]{ "灵动专服-正式", "Logo_gn_zf_release", "MHT_GN_ZF_RELEASE" },
|
new string[]{ "灵动专服-测试", "Logo_gn_zf_test", "MHT_GN_ZF_TEST" , "china/zf_test"},
|
||||||
new string[]{ "喜扑", "Logo_cn_xipu", "MHT_CN_XIPU"},
|
new string[]{ "灵动专服-正式", "Logo_gn_zf_release", "MHT_GN_ZF_RELEASE" , "china/zf_test"},
|
||||||
new string[]{ "草花", "Logo_cn_caohua", "MHT_CN_MIDDLE_WARE" },
|
new string[]{ "喜扑", "Logo_cn_xipu", "MHT_CN_XIPU", "china/zf_test"},
|
||||||
|
new string[]{ "草花", "Logo_cn_caohua", "MHT_CN_MIDDLE_WARE" , "china/zf_test"},
|
||||||
|
|
||||||
|
// 灵动商务
|
||||||
|
new string[]{ "灵动商务", "Logo_mht_sw", "MHT_GN_SW" , "china/dev"},
|
||||||
|
|
||||||
|
|
||||||
|
//先遣
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -49,6 +56,7 @@ public class AutoPack : EditorWindow
|
||||||
static int ExportType;
|
static int ExportType;
|
||||||
static bool[] Chooser;
|
static bool[] Chooser;
|
||||||
static bool isObb = false;
|
static bool isObb = false;
|
||||||
|
static string benchName; // 当前所在分支
|
||||||
|
|
||||||
|
|
||||||
private void OnEnable()
|
private void OnEnable()
|
||||||
|
@ -84,6 +92,9 @@ public class AutoPack : EditorWindow
|
||||||
[MenuItem("自动化打包/一键导出")]
|
[MenuItem("自动化打包/一键导出")]
|
||||||
private static void EzBuildPack()
|
private static void EzBuildPack()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
benchName = GitUtil.GetCurBenchName();
|
||||||
|
UnityEngine.Debug.Log("当前分支:" + benchName);
|
||||||
//创建窗口
|
//创建窗口
|
||||||
Rect wr = new Rect(0, 0, 500, 700);
|
Rect wr = new Rect(0, 0, 500, 700);
|
||||||
var buildWin = GetWindowWithRect<AutoPack>(wr, true);
|
var buildWin = GetWindowWithRect<AutoPack>(wr, true);
|
||||||
|
@ -118,6 +129,8 @@ public class AutoPack : EditorWindow
|
||||||
EditorGUILayout.Space();
|
EditorGUILayout.Space();
|
||||||
EditorGUILayout.LabelField("请选择要打的包:");
|
EditorGUILayout.LabelField("请选择要打的包:");
|
||||||
for(int i = 0; i < PackConfig.Length; i++)
|
for(int i = 0; i < PackConfig.Length; i++)
|
||||||
|
{
|
||||||
|
if (PackConfig[i][3].Equals(benchName))
|
||||||
{
|
{
|
||||||
EditorGUILayout.BeginVertical();
|
EditorGUILayout.BeginVertical();
|
||||||
Chooser[i] = EditorGUILayout.ToggleLeft(PackConfig[i][0], Chooser[i]);
|
Chooser[i] = EditorGUILayout.ToggleLeft(PackConfig[i][0], Chooser[i]);
|
||||||
|
@ -141,7 +154,7 @@ public class AutoPack : EditorWindow
|
||||||
EditorGUILayout.EndVertical();
|
EditorGUILayout.EndVertical();
|
||||||
EditorGUILayout.Space();
|
EditorGUILayout.Space();
|
||||||
EditorGUILayout.Space();
|
EditorGUILayout.Space();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ExportType = EditorGUILayout.Popup("请选择出包方式", ExportType, ExportTypeList);
|
ExportType = EditorGUILayout.Popup("请选择出包方式", ExportType, ExportTypeList);
|
||||||
|
|
Loading…
Reference in New Issue