Skip to content

Commit cba1d28

Browse files
committed
Merge branch 'release/3.0.1'
2 parents 158b3cb + 7fe66d7 commit cba1d28

File tree

10 files changed

+112
-36
lines changed

10 files changed

+112
-36
lines changed

.appveyor.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,9 @@ install:
1010
- ps: $env:DOTNET_INSTALL_DIR = "$pwd\.dotnetsdk"
1111
- ps: mkdir $env:DOTNET_INSTALL_DIR -Force | Out-Null
1212
- ps: Invoke-WebRequest -Uri "https://dotnet.microsoft.com/download/dotnet/scripts/v1/dotnet-install.ps1" -OutFile "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1"
13-
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 2.1.818 -InstallDir $env:DOTNET_INSTALL_DIR'
14-
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 3.1.414 -InstallDir $env:DOTNET_INSTALL_DIR'
15-
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 5.0.402 -InstallDir $env:DOTNET_INSTALL_DIR'
16-
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 6.0.100 -InstallDir $env:DOTNET_INSTALL_DIR'
13+
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 5.0.408 -InstallDir $env:DOTNET_INSTALL_DIR'
14+
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 6.0.413 -InstallDir $env:DOTNET_INSTALL_DIR'
15+
- ps: '& "$($env:DOTNET_INSTALL_DIR)/dotnet-install.ps1" -Version 7.0.401 -InstallDir $env:DOTNET_INSTALL_DIR'
1716
- ps: $env:Path = "$env:DOTNET_INSTALL_DIR;$env:Path"
1817
- ps: dotnet --info
1918

.github/dependabot.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.github/renovate.json

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"github>cake-contrib/renovate-presets"
5+
],
6+
"packageRules": [
7+
{
8+
"description": "Group Azure DevOps packages together",
9+
"matchManagers": [
10+
"nuget"
11+
],
12+
"matchPackagePatterns": [
13+
"Microsoft.TeamFoundationServer.Client|Microsoft.VisualStudio.Services.InteractiveClient"
14+
],
15+
"groupName": "Azure DevOps Client"
16+
}
17+
]
18+
}

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"dotnet.defaultSolution": "src\\Cake.AzureDevOps.sln"
3+
}

global.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"sdk": {
33
"allowPrerelease": true,
4-
"version": "7.0.100",
4+
"version": "7.0.401",
55
"rollForward": "latestFeature"
66
}
77
}

recipe.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#load nuget:?package=Cake.Recipe&version=3.0.1
1+
#load nuget:?package=Cake.Recipe&version=3.1.1
22

33
Environment.SetVariableNames();
44

src/Cake.AzureDevOps.Tests/Cake.AzureDevOps.Tests.csproj

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
@@ -14,15 +14,16 @@
1414
</PropertyGroup>
1515

1616
<ItemGroup>
17-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
17+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.7.2" />
18+
<PackageReference Include="Cake.Common" Version="3.0.0" />
1819
<PackageReference Include="Cake.Core" Version="3.0.0" />
1920
<PackageReference Include="Cake.Testing" Version="3.0.0" />
20-
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.170.0" />
21+
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.205.1" />
2122
<PackageReference Include="Moq" Version="4.18.4" />
22-
<PackageReference Include="Shouldly" Version="4.1.0" />
23+
<PackageReference Include="Shouldly" Version="4.2.1" />
2324
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" />
24-
<PackageReference Include="xunit" Version="2.4.2" />
25-
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.5" />
25+
<PackageReference Include="xunit" Version="2.5.1" />
26+
<PackageReference Include="xunit.runner.visualstudio" Version="2.5.1" />
2627
</ItemGroup>
2728

2829
<ItemGroup>
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
namespace Cake.AzureDevOps.Tests.Pipelines
2+
{
3+
using System.Collections.Generic;
4+
using System.Linq;
5+
using Cake.AzureDevOps.Pipelines;
6+
using Cake.Common.Build.AzurePipelines.Data;
7+
using Microsoft.TeamFoundation.Build.WebApi;
8+
using Shouldly;
9+
using Xunit;
10+
11+
// ReSharper disable once ClassNeverInstantiated.Global
12+
public sealed class ArtifactResourceExtensionsTests
13+
{
14+
public sealed class TheToAzureDevOpsArtifactResourceExtensionMethod
15+
{
16+
[Fact]
17+
public void Should_Return_The_Correct_AzureDevOpsArtifactResource_For_ArtifactResource()
18+
{
19+
// Given
20+
var artifactResource = new ArtifactResource()
21+
{
22+
Data = "data",
23+
DownloadUrl = "downloadUrl",
24+
Url = "url",
25+
Type = "FilePath",
26+
Properties = new Dictionary<string, string>()
27+
{
28+
{ "foo", "bar" },
29+
},
30+
};
31+
32+
// When
33+
var result = artifactResource.ToAzureDevOpsArtifactResource();
34+
35+
// Then
36+
result.Data.ShouldBe(artifactResource.Data);
37+
result.DownloadUrl.ShouldBe(artifactResource.DownloadUrl);
38+
result.Url.ShouldBe(artifactResource.Url);
39+
result.Type.ShouldBe(AzurePipelinesArtifactType.FilePath);
40+
result.Properties.Count.ShouldBe(1);
41+
result.Properties.Single().Key.ShouldBe(artifactResource.Properties.Single().Key);
42+
result.Properties.Single().Value.ShouldBe(artifactResource.Properties.Single().Value);
43+
}
44+
45+
[Theory]
46+
[InlineData("container", AzurePipelinesArtifactType.Container)]
47+
[InlineData("Container", AzurePipelinesArtifactType.Container)]
48+
[InlineData("FilePath", AzurePipelinesArtifactType.FilePath)]
49+
[InlineData("filepath", AzurePipelinesArtifactType.FilePath)]
50+
[InlineData("GitRef", AzurePipelinesArtifactType.GitRef)]
51+
[InlineData("gitref", AzurePipelinesArtifactType.GitRef)]
52+
[InlineData("TFVCLabel", AzurePipelinesArtifactType.TFVCLabel)]
53+
[InlineData("tfvclabel", AzurePipelinesArtifactType.TFVCLabel)]
54+
[InlineData("VersionControl", AzurePipelinesArtifactType.VersionControl)]
55+
[InlineData("versioncontrol", AzurePipelinesArtifactType.VersionControl)]
56+
57+
public void Should_Return_The_Correct_AzureDevOpsArtifactResource_Type_EnumValue_Independent_The_ArtifactResource_Type_String_Casing(string typeString, AzurePipelinesArtifactType expectedResult)
58+
{
59+
// Given
60+
var artifactResource = new ArtifactResource()
61+
{
62+
Type = typeString,
63+
};
64+
65+
// When
66+
var result = artifactResource.ToAzureDevOpsArtifactResource();
67+
68+
// Then
69+
result.Type.ShouldBe(expectedResult);
70+
}
71+
}
72+
}
73+
}

src/Cake.AzureDevOps/Cake.AzureDevOps.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
44
<TargetFrameworks>net6.0;net7.0</TargetFrameworks>
@@ -22,7 +22,7 @@
2222
<PackageLicenseExpression>MIT</PackageLicenseExpression>
2323
<RepositoryType>git</RepositoryType>
2424
<RepositoryUrl>https://github.com/cake-contrib/Cake.AzureDevOps.git</RepositoryUrl>
25-
<PackageReleaseNotes>https://github.com/cake-contrib/Cake.AzureDevOps/releases/tag/3.0.0</PackageReleaseNotes>
25+
<PackageReleaseNotes>https://github.com/cake-contrib/Cake.AzureDevOps/releases/tag/3.0.1</PackageReleaseNotes>
2626
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
2727
<IncludeBuildOutput>false</IncludeBuildOutput>
2828
<TargetsForTfmSpecificContentInPackage>$(TargetsForTfmSpecificContentInPackage);PackBuildOutputs</TargetsForTfmSpecificContentInPackage>
@@ -36,13 +36,13 @@
3636
<ItemGroup>
3737
<PackageReference Include="Cake.Common" Version="3.0.0" PrivateAssets="All" />
3838
<PackageReference Include="Cake.Core" Version="3.0.0" PrivateAssets="All" />
39-
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0">
39+
<PackageReference Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.4">
4040
<PrivateAssets>all</PrivateAssets>
4141
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
4242
</PackageReference>
4343
<PackageReference Include="StyleCop.Analyzers" Version="1.1.118" PrivateAssets="All" />
44-
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.170.0" PrivateAssets="All" />
45-
<PackageReference Include="Microsoft.VisualStudio.Services.InteractiveClient" Version="16.170.0" PrivateAssets="All" />
44+
<PackageReference Include="Microsoft.TeamFoundationServer.Client" Version="16.205.1" PrivateAssets="All" />
45+
<PackageReference Include="Microsoft.VisualStudio.Services.InteractiveClient" Version="16.205.1" PrivateAssets="All" />
4646
<PackageReference Include="TfsUrlParser" Version="1.3.0" PrivateAssets="All" />
4747
</ItemGroup>
4848

src/Cake.AzureDevOps/Pipelines/ArtifactResourceExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public static AzureDevOpsArtifactResource ToAzureDevOpsArtifactResource(this Art
1818
{
1919
artifactResource.NotNull(nameof(artifactResource));
2020

21-
if (!Enum.TryParse(artifactResource.Type, out AzurePipelinesArtifactType type))
21+
if (!Enum.TryParse(artifactResource.Type, true, out AzurePipelinesArtifactType type))
2222
{
2323
throw new InvalidOperationException($"Unexpected value for artifact type '{artifactResource.Type}'");
2424
}

0 commit comments

Comments
 (0)