updated PyprojectUrl

main
Justin Barnett 2025-04-08 14:20:54 -04:00
parent d5917bdbec
commit e9bc45c0df
1 changed files with 7 additions and 3 deletions

View File

@ -14,9 +14,9 @@ namespace UnityMcpBridge.Editor.Helpers
private const string BranchName = "feature/install-overhaul"; // Adjust branch as needed private const string BranchName = "feature/install-overhaul"; // Adjust branch as needed
private const string GitUrl = "https://github.com/justinpbarnett/unity-mcp.git"; private const string GitUrl = "https://github.com/justinpbarnett/unity-mcp.git";
private const string PyprojectUrl = private const string PyprojectUrl =
"https://raw.githubusercontent.com/justinpbarnett/unity-mcp/" "https://raw.githubusercontent.com/justinpbarnett/unity-mcp/refs/heads/"
+ BranchName + BranchName
+ "/UnityMcpServer/pyproject.toml"; + "/UnityMcpServer/src/pyproject.toml";
/// <summary> /// <summary>
/// Ensures the unity-mcp-server is installed and up to date. /// Ensures the unity-mcp-server is installed and up to date.
@ -167,7 +167,10 @@ namespace UnityMcpBridge.Editor.Helpers
private static string GetInstalledVersion(string location) private static string GetInstalledVersion(string location)
{ {
string versionFile = Path.Combine(location, ServerFolder, "version.txt"); string versionFile = Path.Combine(location, ServerFolder, "version.txt");
return File.ReadAllText(versionFile).Trim(); Debug.Log($"Looking for version at: {versionFile}");
string versionFileText = File.ReadAllText(versionFile).Trim();
Debug.Log($"versionFile text: {versionFileText}");
return versionFileText;
} }
/// <summary> /// <summary>
@ -175,6 +178,7 @@ namespace UnityMcpBridge.Editor.Helpers
/// </summary> /// </summary>
private static string GetLatestVersion() private static string GetLatestVersion()
{ {
Debug.Log("Getting latest version.");
using WebClient webClient = new(); using WebClient webClient = new();
string pyprojectContent = webClient.DownloadString(PyprojectUrl); string pyprojectContent = webClient.DownloadString(PyprojectUrl);
return ParseVersionFromPyproject(pyprojectContent); return ParseVersionFromPyproject(pyprojectContent);