From ae5c1a5fca23bbc319bbe21d575eb5a150597879 Mon Sep 17 00:00:00 2001 From: Dean Ellis Date: Thu, 10 Oct 2024 23:32:20 +0100 Subject: [PATCH] Updates and Clean up --- .github/workflows/main.yml | 1 - MonoGame.Framework.Content.Pipeline/ExternalTool.cs | 6 +----- Tools/MonoGame.Content.Builder/BuildContent.cs | 2 +- .../MonoGame.Content.Builder.csproj | 5 ----- build/DeployTasks/UploadArtifactsTask.cs | 3 +++ 5 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 62796963820..a738be909c8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -105,7 +105,6 @@ jobs: - name: Test run: dotnet test Tools/MonoGame.Tools.Tests/MonoGame.Tools.Tests.csproj --blame-hang-timeout 5m -c Release --filter="TestCategory!=Audio" env: - #DOTNET_ROOT: ${{github.workspace}}/dotnet64 MGFXC_WINE_PATH: /Users/runner/.winemonogame CI: true if: runner.os == 'macOS' diff --git a/MonoGame.Framework.Content.Pipeline/ExternalTool.cs b/MonoGame.Framework.Content.Pipeline/ExternalTool.cs index 02b21e6be1d..8fefb37e0f1 100644 --- a/MonoGame.Framework.Content.Pipeline/ExternalTool.cs +++ b/MonoGame.Framework.Content.Pipeline/ExternalTool.cs @@ -47,7 +47,6 @@ public static void RestoreDotnetTool(string command, string toolName) exe = Path.Combine(dotnetRoot, exe); } Run (exe, $"tool {command} {toolName} --tool-path .", out string stdOut, out string stdErr, workingDirectory: path); - Debug.WriteLine($"DEBUG! {stdOut} {stdErr}"); } public static void RestoreDotnetTools() @@ -64,9 +63,7 @@ public static int RunDotnetTool(string toolName, string args, out string stdOut, RestoreDotnetTools (); var exe = FindCommand (toolName); var finalizedArgs = args; - var r = ExternalTool.Run(exe, finalizedArgs, out stdOut, out stdErr, stdIn, workingDirectory); - Debug.WriteLine($"DEBUG! {stdOut} {stdErr}"); - return r; + return ExternalTool.Run(exe, finalizedArgs, out stdOut, out stdErr, stdIn, workingDirectory); } public static int Run(string command, string arguments, out string stdout, out string stderr, string stdin = null, string workingDirectory=null) @@ -108,7 +105,6 @@ public static int Run(string command, string arguments, out string stdout, out s EnsureExecutable(fullPath); - Debug.WriteLine ($"DEBUG! Exec: {command} {arguments}"); using (var process = new Process()) { process.StartInfo = processInfo; diff --git a/Tools/MonoGame.Content.Builder/BuildContent.cs b/Tools/MonoGame.Content.Builder/BuildContent.cs index 1fc49a85144..3e19f9c7303 100644 --- a/Tools/MonoGame.Content.Builder/BuildContent.cs +++ b/Tools/MonoGame.Content.Builder/BuildContent.cs @@ -298,7 +298,7 @@ public void Build(out int successCount, out int errorCount) var intermediatePath = ReplaceSymbols(_intermediateDir); if (!Path.IsPathRooted(intermediatePath)) intermediatePath = PathHelper.Normalize(Path.GetFullPath(Path.Combine(projectDirectory, intermediatePath))); - + _manager = new PipelineManager(projectDirectory, outputPath, intermediatePath); _manager.Logger = new ConsoleLogger(); _manager.CompressContent = CompressContent; diff --git a/Tools/MonoGame.Content.Builder/MonoGame.Content.Builder.csproj b/Tools/MonoGame.Content.Builder/MonoGame.Content.Builder.csproj index 5d52dccdfe0..d7e01d258db 100644 --- a/Tools/MonoGame.Content.Builder/MonoGame.Content.Builder.csproj +++ b/Tools/MonoGame.Content.Builder/MonoGame.Content.Builder.csproj @@ -15,11 +15,6 @@ true - - - - - diff --git a/build/DeployTasks/UploadArtifactsTask.cs b/build/DeployTasks/UploadArtifactsTask.cs index a0e94bf3453..128c0556cfe 100644 --- a/build/DeployTasks/UploadArtifactsTask.cs +++ b/build/DeployTasks/UploadArtifactsTask.cs @@ -17,6 +17,9 @@ public override async Task RunAsync(BuildContext context) // Clean up build tools if installed // otherwise we get permission issues after extraction + // because the zip removes all the permissions. + // Plus in windows hidden files (like the .store directory) + // are ignored. This causes `dotnet tool` to error. var path = System.IO.Path.Combine(context.BuildOutput, "Tests", "Tools", "Release", "tools"); if (System.IO.Directory.Exists(path)) { context.Log.Information ($"Deleting: {path}");