Skip to content

Commit

Permalink
Update Cake.MinVer add-in to target Cake v1.0.0-rc0001
Browse files Browse the repository at this point in the history
  • Loading branch information
augustoproiete committed Dec 1, 2020
1 parent 5b01d69 commit 05c55fa
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/Cake.MinVer/Cake.MinVer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.Core" Version="0.33.0" PrivateAssets="All" />
<PackageReference Include="Cake.Common" Version="0.33.0" PrivateAssets="All" />
<PackageReference Include="Cake.Core" Version="1.0.0-rc0001" />
<PackageReference Include="Cake.Common" Version="1.0.0-rc0001" />

<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
</ItemGroup>

Expand Down
1 change: 1 addition & 0 deletions src/Cake.MinVer/MinVerSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ public MinVerSettings Clone()
NoWorkingDirectory = NoWorkingDirectory,
ArgumentCustomization = ArgumentCustomization,
EnvironmentVariables = EnvironmentVariables,
HandleExitCode = HandleExitCode,
};

return clone;
Expand Down
6 changes: 3 additions & 3 deletions test/Cake.MinVer.Tests/Cake.MinVer.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Cake.Core" Version="0.33.0" />
<PackageReference Include="Cake.Common" Version="0.33.0" />
<PackageReference Include="Cake.Testing" Version="0.33.0" />
<PackageReference Include="Cake.Core" Version="1.0.0-rc0001" />
<PackageReference Include="Cake.Common" Version="1.0.0-rc0001" />
<PackageReference Include="Cake.Testing" Version="1.0.0-rc0001" />

<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
<PackageReference Include="xunit" Version="2.4.0" />
Expand Down
4 changes: 3 additions & 1 deletion test/Cake.MinVer.Tests/MinVerSettingsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ public void Should_Shallow_Clone_All_Properties()
NoWorkingDirectory = true,
ArgumentCustomization = s => s,
EnvironmentVariables = new Dictionary<string, string> { { "MINVERTESTVAR", "SOMEVALUE" } },
HandleExitCode = i => false,
};

var actual = expected.Clone();
Expand All @@ -70,14 +71,15 @@ public void Should_Shallow_Clone_All_Properties()
actual.NoWorkingDirectory.Should().Be(expected.NoWorkingDirectory);
actual.ArgumentCustomization.Should().Be(expected.ArgumentCustomization);
actual.EnvironmentVariables.Should().BeEquivalentTo(expected.EnvironmentVariables);
actual.HandleExitCode.Should().BeEquivalentTo(expected.HandleExitCode);

var properties = typeof(MinVerSettings)
.GetProperties(BindingFlags.Public | BindingFlags.Instance | BindingFlags.FlattenHierarchy)
.Select(p => p.Name)
.ToList();

// Sanity check & alarm to detect changes in properties that need to be considered in the cloning
properties.Should().HaveCount(17);
properties.Should().HaveCount(18);
}
}
}

0 comments on commit 05c55fa

Please sign in to comment.