From c4d8905f049605992ef41420ac5561a5d5c2a935 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 22 Nov 2019 15:34:03 -0500 Subject: [PATCH 1/2] Align mixed path separators Fixes #146 --- src/Uno.Wasm.Bootstrap/ShellTask.cs | 33 ++++++++++++------- .../AdditionalContent/SomeContent01.txt | 1 + .../AdditionalContent/SomeContent02.txt | 1 + src/Uno.Wasm.Sample/Program.cs | 2 +- src/Uno.Wasm.Sample/Uno.Wasm.Sample.csproj | 11 +++++++ 5 files changed, 35 insertions(+), 13 deletions(-) create mode 100644 src/Uno.Wasm.Sample/AdditionalContent/SomeContent01.txt create mode 100644 src/Uno.Wasm.Sample/AdditionalContent/SomeContent02.txt diff --git a/src/Uno.Wasm.Bootstrap/ShellTask.cs b/src/Uno.Wasm.Bootstrap/ShellTask.cs index d9c5ce6..89bd77a 100644 --- a/src/Uno.Wasm.Bootstrap/ShellTask.cs +++ b/src/Uno.Wasm.Bootstrap/ShellTask.cs @@ -186,6 +186,23 @@ namespace Uno.Wasm.Bootstrap } } + private void FileCopy(string source, string dest, bool overwrite = false) + { + // Straigten paths to fix issues with mixed path + string FixupPath(string path) + => path.Replace(Path.AltDirectorySeparatorChar, Path.DirectorySeparatorChar); + + try + { + File.Copy(FixupPath(source), FixupPath(dest), overwrite); + } + catch (Exception) + { + Log.LogError($"Failed to copy {source} to {dest}"); + throw; + } + } + private void CleanupDist() { var unusedFiles = new[] { @@ -375,7 +392,7 @@ namespace Uno.Wasm.Bootstrap if (File.Exists(sourceFileName)) { Log.LogMessage(MessageImportance.High, $"Copying {sourceFileName} -> {destFileName}"); - File.Copy(sourceFileName, destFileName); + FileCopy(sourceFileName, destFileName); } else { @@ -682,10 +699,10 @@ namespace Uno.Wasm.Bootstrap { var dest = Path.Combine(_distPath, Path.GetFileName(sourceFile)); Log.LogMessage($"Runtime {sourceFile} -> {dest}"); - File.Copy(sourceFile, dest, true); + FileCopy(sourceFile, dest, true); } - File.Copy(Path.Combine(MonoWasmSDKPath, "server.py"), Path.Combine(_distPath, "server.py"), true); + FileCopy(Path.Combine(MonoWasmSDKPath, "server.py"), Path.Combine(_distPath, "server.py"), true); } private void CopyContent() @@ -738,15 +755,7 @@ namespace Uno.Wasm.Bootstrap var dest = Path.Combine(_distPath, relativePath); Log.LogMessage($"ContentFile {fullSourcePath} -> {dest}"); - try - { - File.Copy(fullSourcePath, dest, true); - } - catch(Exception e) - { - Log.LogError($"Failed to copy {fullSourcePath} to {dest}"); - throw; - } + FileCopy(fullSourcePath, dest, true); } } } diff --git a/src/Uno.Wasm.Sample/AdditionalContent/SomeContent01.txt b/src/Uno.Wasm.Sample/AdditionalContent/SomeContent01.txt new file mode 100644 index 0000000..dfb33c7 --- /dev/null +++ b/src/Uno.Wasm.Sample/AdditionalContent/SomeContent01.txt @@ -0,0 +1 @@ +Hello Uno ! diff --git a/src/Uno.Wasm.Sample/AdditionalContent/SomeContent02.txt b/src/Uno.Wasm.Sample/AdditionalContent/SomeContent02.txt new file mode 100644 index 0000000..dfb33c7 --- /dev/null +++ b/src/Uno.Wasm.Sample/AdditionalContent/SomeContent02.txt @@ -0,0 +1 @@ +Hello Uno ! diff --git a/src/Uno.Wasm.Sample/Program.cs b/src/Uno.Wasm.Sample/Program.cs index ecb9a3f..0aa4265 100644 --- a/src/Uno.Wasm.Sample/Program.cs +++ b/src/Uno.Wasm.Sample/Program.cs @@ -18,7 +18,7 @@ using System; namespace Uno.Wasm.Sample { - public static class Program + public static class Program { static void Main(string[] args) { diff --git a/src/Uno.Wasm.Sample/Uno.Wasm.Sample.csproj b/src/Uno.Wasm.Sample/Uno.Wasm.Sample.csproj index 48e4feb..0eb861c 100644 --- a/src/Uno.Wasm.Sample/Uno.Wasm.Sample.csproj +++ b/src/Uno.Wasm.Sample/Uno.Wasm.Sample.csproj @@ -26,12 +26,23 @@ + + + + + + + + + + + From 5c5aa8276421d79d2ad65773c65ac45e154b55c8 Mon Sep 17 00:00:00 2001 From: Jerome Laban Date: Fri, 22 Nov 2019 16:18:50 -0500 Subject: [PATCH 2/2] Bump version --- gitversion.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gitversion.yml b/gitversion.yml index 3b31d22..3a8cab6 100644 --- a/gitversion.yml +++ b/gitversion.yml @@ -1,6 +1,6 @@ assembly-versioning-scheme: MajorMinorPatch mode: ContinuousDeployment -next-version: 1.0.2 +next-version: 1.0.4 continuous-delivery-fallback-tag: "" branches: master: