Skip to content

Commit 63b4e83

Browse files
authored
Merge pull request #26 from kirkone/feature/pipelinecondition
Update build definition
2 parents 5ea7c5e + ffee4bb commit 63b4e83

3 files changed

Lines changed: 7 additions & 4 deletions

File tree

build/KK.AspNetCore.EasyAuthAuthentication.yaml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ steps:
1717
filePath: "tools/GitVersion/Run-GitVersion.ps1"
1818
workingDirectory: "src/KK.AspNetCore.EasyAuthAuthentication"
1919

20-
- task: DotNetCoreInstaller@0
20+
- task: UseDotNet@2
2121
displayName: Use .NET Core $(DotNetVersion)
2222
inputs:
2323
packageType: "sdk"
24-
version: $(DotNetVersion)
24+
version: '$(DotNetVersion)'
2525

2626
- task: DotNetCoreCLI@2
2727
displayName: Restore
@@ -38,6 +38,7 @@ steps:
3838

3939
- task: DotNetCoreCLI@2
4040
displayName: Pack Internal
41+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
4142
inputs:
4243
command: "pack"
4344
packagesToPack: "src/KK.AspNetCore.EasyAuthAuthentication/KK.AspNetCore.EasyAuthAuthentication.csproj"
@@ -49,6 +50,7 @@ steps:
4950

5051
- task: DotNetCoreCLI@2
5152
displayName: Pack Release
53+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
5254
inputs:
5355
command: "pack"
5456
packagesToPack: "src/KK.AspNetCore.EasyAuthAuthentication/KK.AspNetCore.EasyAuthAuthentication.csproj"
@@ -60,6 +62,7 @@ steps:
6062

6163
- task: PublishBuildArtifacts@1
6264
displayName: Publish Artifact
65+
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
6366
inputs:
6467
pathtoPublish: "$(Build.ArtifactStagingDirectory)"
6568
artifactName: NuGet

src/KK.AspNetCore.EasyAuthAuthentication/AuthenticationTicketBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ private static void AddProviderNameClaim(ClaimsIdentity identity, string provide
7777
identity.AddClaim(new Claim("provider_name", providerName));
7878
}
7979
}
80-
80+
8181
private static void AddUserIdClaim(ClaimsIdentity identity, string claimType, string userid)
8282
{
8383
if (!identity.Claims.Any(claim => claim.Type == claimType))

src/KK.AspNetCore.EasyAuthAuthentication/EasyAuthAuthenticationOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class EasyAuthAuthenticationOptions : AuthenticationSchemeOptions
2020
/// </summary>
2121
/// <value>The Claim Type to use for the User. Default is <c>ClaimTypes.Name</c>.</value>
2222
public string NameClaimType { get; set; } = ClaimTypes.Name;
23-
23+
2424
/// <summary>
2525
/// The <c>ClaimType</c> for the Idendity Role.
2626
/// </summary>

0 commit comments

Comments
 (0)