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

Commit

Permalink
Publish from Linux
Browse files Browse the repository at this point in the history
We can revert this later when we have a better solution in place.
  • Loading branch information
gusty committed Nov 1, 2018
1 parent a86e7eb commit c27b7c5
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,38 @@ jobs:
inputs:
pathtoPublish: 'bin'
artifactName: 'nupkgs'
- task: NuGetCommand@2
condition: succeeded()
inputs:
command: push
nuGetFeedType: external
publishFeedCredentials: 'Jet-MyGet'
versioningScheme: byEnvVar
versionEnvVar: Version
packagesToPush: 'bin/*.nupkg;bin/*.symbols.nupkg'
- job: Linux
pool:
vmImage: 'ubuntu-16.04'
vmImage: 'ubuntu-16.04'
steps:
- script: echo "##vso[task.setvariable variable=FrameworkPathOverride]$(dirname $(which mono))/../lib/mono/4.5/"
displayName: Workaround .NET reference assemblies on linux
- powershell: |
$buildId = $env:BUILD_BUILDNUMBER.PadLeft(7, '0');
$versionSuffixPR = "ci-$buildId-pr$($env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER)";
$branchName = "$env:BUILD_SOURCEBRANCHNAME".Replace("_","");
$versionSuffixBRANCH = "$branchName.$buildId";
$isTag = "$env:BUILD_SOURCEBRANCH".StartsWith('refs/tags/');
$isPR = "$env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER" -ne ""
$versionSuffix = if ($isTag) { "" } else { if ($isPR) { $versionSuffixPR } else { $versionSuffixBRANCH } };
Write-Host "##vso[task.setvariable variable=VersionSuffix]$versionSuffix";
displayName: compute VersionSuffix
- script: dotnet msbuild build.proj
displayName: Test + Build
- task: PublishTestResults@2
inputs:
testResultsFormat: 'VSTest'
testResultsFiles: 'tests/**/*.trx'
condition: succeededOrFailed()
- task: NuGetCommand@2
condition: succeededOrFailed()
inputs:
command: push
nuGetFeedType: external
publishFeedCredentials: 'Jet-MyGet'
versioningScheme: byEnvVar
versionEnvVar: Version
packagesToPush: 'bin/*.nupkg;bin/*.symbols.nupkg'
- job: MacOS
pool:
vmImage: 'macOS-10.13'
Expand Down

0 comments on commit c27b7c5

Please sign in to comment.