Add OutputVersion nuke target (#14890)
* Replace PRNumber with VersionNumber+nuke * Restore prId file * Fix env var name * Change artifact name back for compatibility
This commit is contained in:
+9
-21
@@ -2,31 +2,19 @@ jobs:
|
||||
|
||||
- job: GetPRNumber
|
||||
pool:
|
||||
vmImage: 'windows-2022'
|
||||
vmImage: 'ubuntu-20.04'
|
||||
variables:
|
||||
SolutionDir: '$(Build.SourcesDirectory)'
|
||||
steps:
|
||||
- task: PowerShell@2
|
||||
displayName: Get PR Number
|
||||
- task: UseDotNet@2
|
||||
displayName: 'Use .NET 8.0 SDK'
|
||||
inputs:
|
||||
targetType: 'inline'
|
||||
script: |
|
||||
$Namespace = @{ msbuild = "http://schemas.microsoft.com/developer/msbuild/2003" }
|
||||
$versionBase = Select-Xml -Path build\SharedVersion.props -XPath /msbuild:Project/msbuild:PropertyGroup/msbuild:Version -Namespace $Namespace |ForEach-Object {$_.Node.Innerxml}
|
||||
Write-Host "Base Version Number is:-" $versionBase
|
||||
|
||||
$prId = $env:System_PullRequest_PullRequestNumber
|
||||
Write-Host "PR Number is:-" $env:System_PullRequest_PullRequestNumber
|
||||
|
||||
if (!([string]::IsNullOrWhiteSpace($prId)))
|
||||
{
|
||||
Set-Content -Path $env:Build_ArtifactStagingDirectory\prId.txt -Value $prId
|
||||
}
|
||||
if (!([string]::IsNullOrWhiteSpace($versionBase)))
|
||||
{
|
||||
Set-Content -Path $env:Build_ArtifactStagingDirectory\versionBase.txt -Value $versionBase
|
||||
}
|
||||
|
||||
packageType: sdk
|
||||
useGlobalJson: true
|
||||
- task: CmdLine@2
|
||||
displayName: 'Run Build'
|
||||
inputs:
|
||||
script: ./build.sh --target OutputVersion --version-output-dir $(Build.ArtifactStagingDirectory)
|
||||
- task: PublishBuildArtifacts@1
|
||||
inputs:
|
||||
PathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
||||
|
||||
Reference in New Issue
Block a user