Skip to content

Commit b59eef2

Browse files
authored
Merge pull request #1816 from OctopusDeploy/mergebot/from-release-2026.1-to-main-7b327b0f1
[Auto-merge from release/2026.1 to main] Merge mergebot/from-release-2026.1-to-main-7b327b0f1 to main
2 parents f7b509d + a2025ea commit b59eef2

File tree

9 files changed

+43
-3
lines changed

9 files changed

+43
-3
lines changed

NuGet.Config

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
<packageSourceMapping>
88
<packageSource key="feedz.io">
99
<package pattern="AlphaFS" />
10+
<package pattern="NuGet.Common" />
11+
<package pattern="NuGet.Configuration" />
12+
<package pattern="NuGet.Frameworks" />
13+
<package pattern="NuGet.Packaging" />
14+
<package pattern="NuGet.Protocol" />
15+
<package pattern="NuGet.Versioning" />
1016
<package pattern="Octopus.CoreUtilities" />
1117
<package pattern="Octopus.Data" />
1218
<package pattern="Octopus.Dependencies.*" />
@@ -19,6 +25,12 @@
1925
<package pattern="Octopus.TinyTypes" />
2026
</packageSource>
2127
<packageSource key="NuGet.org v3">
28+
<package pattern="NuGet.Common" />
29+
<package pattern="NuGet.Configuration" />
30+
<package pattern="NuGet.Frameworks" />
31+
<package pattern="NuGet.Packaging" />
32+
<package pattern="NuGet.Protocol" />
33+
<package pattern="NuGet.Versioning" />
2234
<package pattern="Octopus.Versioning" />
2335
<package pattern="Octopus.TinyTypes" />
2436
<package pattern="*" />

build/NuGet.Config

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,17 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<packageSources>
4+
<clear />
45
<add key="NuGet.org v3" value="https://api.nuget.org/v3/index.json" />
56
</packageSources>
67
<packageSourceMapping>
78
<packageSource key="NuGet.org v3">
9+
<package pattern="NuGet.Common" />
10+
<package pattern="NuGet.Configuration" />
11+
<package pattern="NuGet.Frameworks" />
12+
<package pattern="NuGet.Packaging" />
13+
<package pattern="NuGet.Protocol" />
14+
<package pattern="NuGet.Versioning" />
815
<package pattern="*" />
916
</packageSource>
1017
</packageSourceMapping>

source/Calamari.Common/Calamari.Common.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515

1616
<ItemGroup>
1717
<PackageReference Include="NuGet.Commands" Version="7.0.1" />
18+
<PackageReference Include="NuGet.Packaging" Version="7.4.0-octopus-release.17001" />
1819
<PackageReference Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
1920
<PackageReference Include="System.Text.Encoding.CodePages" Version="8.0.0" />
2021
<PackageReference Include="System.Threading.AccessControl" Version="4.3.0" />

source/Calamari.ConsolidateCalamariPackages.Tests/Calamari.ConsolidateCalamariPackages.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PackageReference Include="Assent" Version="1.5.0" />
1111
<PackageReference Include="FluentAssertions" Version="7.2.0" />
1212
<PackageReference Include="NSubstitute" Version="4.2.1" />
13-
<PackageReference Include="NuGet.Packaging" Version="7.0.1" />
13+
<PackageReference Include="NuGet.Packaging" Version="7.4.0-octopus-release.17001" />
1414
<PackageReference Include="nunit" Version="3.14.0" />
1515
<PackageReference Include="NUnit3TestAdapter" Version="5.2.0" />
1616
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="18.0.0" />

source/Calamari.Terraform/Calamari.Terraform.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</PropertyGroup>
1212
<ItemGroup>
1313
<PackageReference Include="AWSSDK.SecurityToken" Version="3.7.401.11" />
14-
<PackageReference Include="NuGet.Versioning" Version="7.0.1" />
14+
<PackageReference Include="NuGet.Versioning" Version="7.4.0-octopus-release.17001" />
1515
</ItemGroup>
1616
<ItemGroup>
1717
<ProjectReference Include="..\Calamari.CloudAccounts\Calamari.CloudAccounts.csproj" />

source/Calamari.Tests/Fixtures/Deployment/Conventions/ExtractPackageFixture.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ public class ExtractPackageFixture
1818
ExtractPackage extractPackage;
1919
ICalamariFileSystem fileSystem;
2020
static readonly PathToPackage PathToPackage = new PathToPackage(TestEnvironment.ConstructRootedPath("Acme.Web.1.0.0.zip"));
21+
static readonly PathToPackage PathToPackageWithLeadingZeros = new PathToPackage(TestEnvironment.ConstructRootedPath("Acme.Core.1.0.01.nupkg"));
22+
static readonly PathToPackage PathToPackageWithMetadata = new PathToPackage(TestEnvironment.ConstructRootedPath("Acme.Core.1.0.1+ace8cda.nupkg"));
2123

2224
[SetUp]
2325
public void SetUp()
@@ -96,7 +98,6 @@ public void ShouldAppendToVersionedFolderIfAlreadyExisting()
9698

9799
Assert.That(variables.Get("OctopusOriginalPackageDirectoryPath"), Does.EndWith(Path.Combine("Acme.Web", "1.0.0_3")));
98100
}
99-
100101

101102
[Test]
102103
public void ShouldExtractToEnvironmentSpecificFolderIfProvided()

source/Calamari.Tests/Fixtures/Integration/Packages/PackageExtractorFixture.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,25 @@ public void ExtractTakesIntoAccountEncoding(Type extractorType, string extension
182182
}
183183
}
184184

185+
// Ensure package extraction maintains support for:
186+
// - leading zeros
187+
// - build metadata
188+
// see: https://docs.octopushq.com/docs/features-and-subsystems/NugetFork
189+
[Test]
190+
[TestCase("1.0.01")]
191+
[TestCase("1.0.1+ace8cda")]
192+
public void ExtractTakesIntoAccountForOctopusVersions(string version)
193+
{
194+
var fileName = GetFixtureResource("Samples", $"{PackageId}.{version}.nupkg");
195+
var extractor = new NupkgExtractor(ConsoleLog.Instance);
196+
var targetDir = GetTargetDir(typeof(NupkgExtractor), fileName);
197+
198+
extractor.Extract(fileName, targetDir);
199+
200+
var metadata = PackageName.FromFile(fileName);
201+
Assert.That(metadata.Version.ToString(), Is.EqualTo(version));
202+
}
203+
185204
[Test]
186205
//Latest version of SharpCompress throws an exception if a symbolic link is encountered and we haven't provided a handler for it.
187206
public void ExtractIgnoresSymbolicLinks()
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)