From bf8e5c4840af592cdd44a413b8f706b6dec77cdb Mon Sep 17 00:00:00 2001 From: ForeseePretty Date: Fri, 28 Oct 2022 13:52:32 +0800 Subject: [PATCH] =?UTF-8?q?[fix]:=E4=BF=AE=E6=AD=A3hybridclr=E4=B8=8Eil2cp?= =?UTF-8?q?p=5Fplus=E4=BB=93=E5=BA=93=E6=9B=B4=E6=96=B0=E6=A3=80=E6=B5=8B?= =?UTF-8?q?=E7=9A=84fetch=E6=B7=B1=E5=BA=A6=20(#15)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [fix]:修正hybridclr与il2cpp_plus仓库更新检测的fetch深度 --- Editor/Installer/UpdateController.cs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/Editor/Installer/UpdateController.cs b/Editor/Installer/UpdateController.cs index 9575661..8fe5549 100644 --- a/Editor/Installer/UpdateController.cs +++ b/Editor/Installer/UpdateController.cs @@ -6,10 +6,12 @@ { string workDir = SettingsUtil.HybridCLRDataDir; // last hash hybridclr - string hybridclrRepoDir = $"{workDir}/{hybridclr_repo_path}"; { + string hybridclrRepoDir = $"{workDir}/{hybridclr_repo_path}"; var ret1 = BashUtil.RunCommand2(hybridclrRepoDir, "git", new string[] { "log", "HEAD", "-n", "1", "--pretty=format:\"%H\"", }); + BashUtil.RunCommand2(hybridclrRepoDir, "git", + new string[] { "fetch", "depth=1" }); var ret2 = BashUtil.RunCommand2(hybridclrRepoDir, "git", new string[] { "log", "remotes/origin/HEAD", "-n", "1", "--pretty=format:\"%H\"", }); if (ret1.StdOut != ret2.StdOut) @@ -17,12 +19,13 @@ return true; } } - // last hash il2cpp_plus - string il2cppPlusRepoDir = $"{workDir}/{il2cpp_plus_repo_path}"; { + string il2cppPlusRepoDir = $"{workDir}/{il2cpp_plus_repo_path}"; var ret1 = BashUtil.RunCommand2(il2cppPlusRepoDir, "git", new string[] { "log", $"{il2cppBranch}", "-n", "1", "--pretty=format:\"%H\"", }); + BashUtil.RunCommand2(il2cppPlusRepoDir, "git", + new string[] { "fetch", "depth=1" }); var ret2 = BashUtil.RunCommand2(il2cppPlusRepoDir, "git", new string[] { "log", $"remotes/origin/{il2cppBranch}", "-n", "1", "--pretty=format:\"%H\"", }); if (ret1.StdOut != ret2.StdOut)