【打包工具】添加是否要提交到GIt的判断
parent
70bc51f319
commit
8f29aa0cf8
|
@ -34,6 +34,7 @@ public class AutoPack : EditorWindow
|
|||
static string ABPath;
|
||||
static string APKPath;
|
||||
static string PackTime;
|
||||
static bool CommitToGit;
|
||||
|
||||
// 判断是否要重新导出工程
|
||||
static string[] ExportTypeList =
|
||||
|
@ -132,6 +133,7 @@ public class AutoPack : EditorWindow
|
|||
|
||||
ExportType = EditorGUILayout.Popup("请选择出包方式", ExportType, ExportTypeList);
|
||||
EditorGUILayout.Space();
|
||||
CommitToGit = EditorGUILayout.ToggleLeft("是否要提交到Git", CommitToGit);
|
||||
EditorGUILayout.Space();
|
||||
|
||||
|
||||
|
@ -375,10 +377,13 @@ public class AutoPack : EditorWindow
|
|||
}
|
||||
private static void GitCommit(int index)
|
||||
{
|
||||
EditorUtility.DisplayProgressBar("正在提交修改", "", 0f);
|
||||
ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git add .>" + APKPath + "/_log.txt");
|
||||
ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git commit 'AutoPack:"+ PackConfig[index][0]+" "+PackTime+"/"+ PackConfig[index][2] +".apk'");
|
||||
EditorUtility.ClearProgressBar();
|
||||
if (CommitToGit)
|
||||
{
|
||||
EditorUtility.DisplayProgressBar("正在提交修改", "", 0f);
|
||||
ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git add .>" + APKPath + "/_log.txt");
|
||||
ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git commit 'AutoPack:" + PackConfig[index][0] + " " + PackTime + "/" + PackConfig[index][2] + ".apk'");
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue