【工具】打包工具优化
parent
f50717ce27
commit
1f5256afdf
|
@ -363,7 +363,7 @@ public class AutoPack : EditorWindow
|
|||
private static void StartGradleBuild(int index)
|
||||
{
|
||||
EditorUtility.DisplayProgressBar("正在生成APK", "", 0f);
|
||||
GameEditor.Util.ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "gradlew assembleRelease>" + APKPath + "/_log.txt");
|
||||
GameEditor.Util.ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "gradlew assembleRelease>>" + APKPath + "/_log.txt");
|
||||
|
||||
EditorUtility.DisplayProgressBar("正在导出APK", "", 1f);
|
||||
string apkFilePath = _MomPackPath + PackConfig[index][2] + "/build/outputs/apk/release/" + PackConfig[index][2] + "-release.apk";
|
||||
|
@ -378,7 +378,7 @@ public class AutoPack : EditorWindow
|
|||
private static void GitUpdate(int index)
|
||||
{
|
||||
EditorUtility.DisplayProgressBar("正在更新母包", "", 0f);
|
||||
ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git pull>" + APKPath + "/_log.txt");
|
||||
ProcessUtil.ProcessCommand(_MomPackPath, "git pull>>" + APKPath + "/_log.txt");
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
private static void GitCommit(int index)
|
||||
|
@ -386,8 +386,15 @@ public class AutoPack : EditorWindow
|
|||
if (CommitToGit)
|
||||
{
|
||||
EditorUtility.DisplayProgressBar("正在提交修改", "", 0f);
|
||||
ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git add .>" + APKPath + "/_log.txt");
|
||||
ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], "git commit -m 'AutoPack:" + PackConfig[index][0] + " " + PackTime + "/" + PackConfig[index][2] + ".apk'");
|
||||
string printlog = ">>" + APKPath + "/_log.txt";
|
||||
string[] commands = new string[]{
|
||||
"echo git add ." + printlog,
|
||||
"git add ." + printlog,
|
||||
"echo git commit -m 'AutoPack:" + PackConfig[index][0] + "-" + PackTime + "-" + PackConfig[index][2] + ".apk'" + printlog,
|
||||
"git commit -m 'AutoPack:" + PackConfig[index][0] + "-" + PackTime + "-" + PackConfig[index][2] + ".apk'" + printlog,
|
||||
|
||||
};
|
||||
ProcessUtil.ProcessCommand(_MomPackPath + PackConfig[index][2], commands);
|
||||
EditorUtility.ClearProgressBar();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue