Skip to content
This repository has been archived by the owner on Dec 29, 2020. It is now read-only.

Commit

Permalink
Merge pull request #1 from Net-Http-OData/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
TrevorPilley authored Jan 14, 2020
2 parents 8268063 + 519a667 commit 9f05db3
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pool:

variables:
buildConfiguration: 'Release'
buildVersion: '0.0.0'

steps:
- script: dotnet build --configuration $(buildConfiguration)
Expand All @@ -20,10 +21,18 @@ steps:
- script: dotnet test
displayName: 'dotnet test'

- script: dotnet pack --no-build -p:PackageVersion=$(BuildVersion)-$(Date:yyyyMMdd)$(Rev:.r)
- task: PowerShell@2
inputs:
targetType: 'inline'
script: |
$projVersion = ([xml](Get-Content ".\Net.Http.OData\Net.Http.OData.csproj")) | Select-Xml -XPath "//Project/PropertyGroup[1]/Version"
Write-Host "##vso[task.setvariable variable=buildVersion]$projVersion"
- script: dotnet pack --no-build -p:PackageVersion="$(buildVersion)-beta$(Build.BuildId)"
displayName: 'dotnet pack (pre)'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/develop'))

- script: dotnet pack --no-build -p:PackageVersion=$(BuildVersion)
- script: dotnet pack --no-build -p:PackageVersion=$(buildVersion)
displayName: 'dotnet pack'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))

0 comments on commit 9f05db3

Please sign in to comment.