Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
📦 Dropping NS.Json to 11.0.2 to work with Functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
PureKrome committed Mar 21, 2019
1 parent 047faf7 commit 4a19c65
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
26 changes: 21 additions & 5 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,45 @@ trigger:
branches:
include:
- master

- refs/tags/*
pr:
autoCancel: false

steps:

- powershell: |
$buildVersion = $env:BUILD_BUILDNUMBER
Write-Host "##vso[task.setvariable variable=assemblyVersion]$buildVersion"
Write-Host "Assembly version is" $buildVersion
displayName: 'Set the assembly version number.'

- powershell: |
$tagVersion = $env:BUILD_SOURCEBRANCH.remove(0, 10)
Write-Host "##vso[task.setvariable variable=assemblyVersion]$tagVersion"
Write-Host "*** TAG OVERWRITE :: Assembly version is" $tagVersion
displayName: 'Update assembly version to be the Tag value.'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))

# Remove this task once .NET Core 2.2 is added to hosted agent.
- task: DotNetCoreInstaller@0
inputs:
packageType: 'sdk'
version: '2.2.100'

- script: dotnet build --configuration $(buildConfiguration) -p:Version=$(Build.BuildNumber)
- script: dotnet build --configuration $(buildConfiguration) -p:Version=$(assemblyVersion)
displayName: 'dotnet build'

- task: DotNetCoreCLI@2
inputs:
command: test
projects: '**/tests/*/*.csproj'
arguments: '--configuration $(buildConfiguration) -p:Version=$(Build.BuildNumber) --no-build'
arguments: '--configuration $(buildConfiguration) -p:Version=$(assemblyVersion) --no-build'
displayName: 'dotnet test'

- script: dotnet pack --configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory) -p:Version=$(Build.BuildNumber) -v normal --no-build
displayName: 'dotnet pack (create nuget package)'
- script: dotnet pack --configuration $(buildConfiguration) --output $(Build.ArtifactStagingDirectory) -p:Version=$(assemblyVersion) -v normal --no-build
displayName: 'dotnet pack [i.e. create nuget package]'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))

- task: PublishBuildArtifacts@1
displayName: 'Publish artifacts'
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))
2 changes: 1 addition & 1 deletion src/Homely.Testing/Homely.Testing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<ItemGroup>
<PackageReference Include="Moq" Version="4.10.1" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.1" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="Shouldly" Version="3.0.2" />
</ItemGroup>

Expand Down
9 changes: 6 additions & 3 deletions tests/Homely.Testing.Tests/Homely.Testing.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.0-preview-20181205-02" />
<PackageReference Include="xunit" Version="2.4.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.0.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 4a19c65

Please sign in to comment.