44 lines
1.5 KiB
YAML
44 lines
1.5 KiB
YAML
parameters:
|
|
ReleaseTagVar: v6.2.0
|
|
ReleaseTagVarName: ReleaseTagVar
|
|
CreateJson: 'no'
|
|
|
|
steps:
|
|
- powershell: |
|
|
$path = "./build.psm1"
|
|
|
|
if(Test-Path -Path $path)
|
|
{
|
|
$vstsCommandString = "vso[task.setvariable variable=repoRoot]."
|
|
Write-Host ("sending " + $vstsCommandString)
|
|
Write-Host "##$vstsCommandString"
|
|
}
|
|
else{
|
|
$path = "./PowerShell/build.psm1"
|
|
if(Test-Path -Path $path)
|
|
{
|
|
$vstsCommandString = "vso[task.setvariable variable=repoRoot]./PowerShell"
|
|
Write-Host ("sending " + $vstsCommandString)
|
|
Write-Host "##$vstsCommandString"
|
|
}
|
|
}
|
|
displayName: 'Set repo Root'
|
|
|
|
- powershell: |
|
|
$createJson = ("${{ parameters.ReleaseTagVarName }}" -ne "no")
|
|
$releaseTag = & "$env:REPOROOT/tools/releaseBuild/setReleaseTag.ps1" -ReleaseTag ${{ parameters.ReleaseTagVar }} -Variable "${{ parameters.ReleaseTagVarName }}" -CreateJson:$createJson
|
|
$version = $releaseTag.Substring(1)
|
|
$vstsCommandString = "vso[task.setvariable variable=Version]$version"
|
|
Write-Host ("sending " + $vstsCommandString)
|
|
Write-Host "##$vstsCommandString"
|
|
|
|
$azureVersion = $releaseTag.ToLowerInvariant() -replace '\.', '-'
|
|
$vstsCommandString = "vso[task.setvariable variable=AzureVersion]$azureVersion"
|
|
Write-Host ("sending " + $vstsCommandString)
|
|
Write-Host "##$vstsCommandString"
|
|
displayName: 'Set ${{ parameters.ReleaseTagVarName }} and other version Variables'
|
|
|
|
- powershell: |
|
|
Get-ChildItem -Path env:
|
|
displayName: Capture environment
|
|
condition: succeededOrFailed()
|