diff --git a/source/Calamari.Common/Features/Scripting/DotnetScript/DotnetScriptBootstrapper.cs b/source/Calamari.Common/Features/Scripting/DotnetScript/DotnetScriptBootstrapper.cs index d5d600f6a..3445dd9a1 100644 --- a/source/Calamari.Common/Features/Scripting/DotnetScript/DotnetScriptBootstrapper.cs +++ b/source/Calamari.Common/Features/Scripting/DotnetScript/DotnetScriptBootstrapper.cs @@ -84,9 +84,6 @@ static DotnetScriptBootstrapper() public static string FindBundledExecutable() { - if (ScriptingEnvironment.IsNetFramework()) - throw new CommandException("dotnet-script requires .NET Core 6 or later"); - var exeName = $"dotnet-script.{(CalamariEnvironment.IsRunningOnWindows ? "cmd" : "dll")}"; var myPath = typeof(DotnetScriptExecutor).Assembly.Location; var parent = Path.GetDirectoryName(myPath); diff --git a/source/Calamari.ConsolidateCalamariPackages.Tests/IntegrationTests.cs b/source/Calamari.ConsolidateCalamariPackages.Tests/IntegrationTests.cs index 373e51270..220db4331 100644 --- a/source/Calamari.ConsolidateCalamariPackages.Tests/IntegrationTests.cs +++ b/source/Calamari.ConsolidateCalamariPackages.Tests/IntegrationTests.cs @@ -18,7 +18,7 @@ namespace Calamari.ConsolidateCalamariPackages.Tests [TestFixture] public class IntegrationTests { - readonly Assent.Configuration assentConfiguration = new Assent.Configuration().UsingSanitiser(s => Sanitise4PartVersions(SanitiseHashes(s))); + readonly Assent.Configuration assentConfiguration = new Assent.Configuration().UsingSanitiser(s => Sanitise4PartVersions(SanitiseFilenamesInIndex(s))); static readonly string TestPackagesDirectory = "../../../testPackages"; private string temp; @@ -85,7 +85,7 @@ public void AndThenThePackageIsCreated() public void AndThenThePackageContentsShouldBe() { using (var zip = ZipFile.Open(expectedZip, ZipArchiveMode.Read)) - this.Assent(string.Join("\r\n", zip.Entries.Select(e => SanitiseHashes(e.FullName)).OrderBy(k => k)), assentConfiguration); + this.Assent(string.Join("\r\n", zip.Entries.Select(e => SanitiseHashesInPackageList(e.FullName)).OrderBy(k => k)), assentConfiguration); } public void AndThenTheIndexShouldBe() @@ -96,8 +96,12 @@ public void AndThenTheIndexShouldBe() this.Assent(sr.ReadToEnd(), assentConfiguration); } - private static string SanitiseHashes(string s) - => Regex.Replace(s, "[a-z0-9]{32}", ""); + private static string SanitiseFilenamesInIndex(string s) + => Regex.Replace(s, "[a-z0-9]{32}\\\\[^\"]*", ""); + + private static string SanitiseHashesInPackageList(string s) + => Regex.Replace(s, "[a-z0-9]{32}", ""); + private static string Sanitise4PartVersions(string s) => Regex.Replace(s, @"[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+", ""); diff --git a/source/Calamari.ConsolidateCalamariPackages/ConsolidatedPackageCreator.cs b/source/Calamari.ConsolidateCalamariPackages/ConsolidatedPackageCreator.cs index b830e8a72..cd367a3b0 100644 --- a/source/Calamari.ConsolidateCalamariPackages/ConsolidatedPackageCreator.cs +++ b/source/Calamari.ConsolidateCalamariPackages/ConsolidatedPackageCreator.cs @@ -56,7 +56,7 @@ Dictionary GroupByPlatform(IEnumerable filesForPac .GroupBy(f => f.Platform) .ToDictionary( g => g.Key, - g => g.Select(f => f.Hash).OrderBy(h => h).ToArray() + g => g.Select(f => Path.Combine(f.Hash, f.FullNameInDestinationArchive.Replace('/', Path.DirectorySeparatorChar))).OrderBy(h => h).ToArray() ); var index = new ConsolidatedPackageIndex( diff --git a/source/Calamari.GoogleCloudScripting/GoogleCloudContextScriptWrapper.cs b/source/Calamari.GoogleCloudScripting/GoogleCloudContextScriptWrapper.cs index faff5f1f8..ef7c3481d 100644 --- a/source/Calamari.GoogleCloudScripting/GoogleCloudContextScriptWrapper.cs +++ b/source/Calamari.GoogleCloudScripting/GoogleCloudContextScriptWrapper.cs @@ -31,7 +31,7 @@ public GoogleCloudContextScriptWrapper(ILog log, IVariables variables) public bool IsEnabled(ScriptSyntax syntax) => supportedScriptSyntax.Contains(syntax); public IScriptWrapper? NextWrapper { get; set; } - + public CommandResult ExecuteScript(Script script, ScriptSyntax scriptSyntax, ICommandLineRunner commandLineRunner, diff --git a/source/Calamari/Calamari.csproj b/source/Calamari/Calamari.csproj index eca113155..f27cb469e 100644 --- a/source/Calamari/Calamari.csproj +++ b/source/Calamari/Calamari.csproj @@ -106,7 +106,7 @@ - +