-
Notifications
You must be signed in to change notification settings - Fork 12
Expand file tree
/
Copy pathazp-initialization.yaml
More file actions
33 lines (28 loc) · 1.25 KB
/
azp-initialization.yaml
File metadata and controls
33 lines (28 loc) · 1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
steps:
# Read $(Version) from the UiPath.CoreIpc.csproj file
- powershell: |
$xml = [Xml] ( Get-Content $env:DotNet_MainProjectPath )
$version = [String] $xml.Project.PropertyGroup.Version
$version = $version.Trim()
Write-Host "##vso[task.setvariable variable=Version;]$version"
displayName: '$(Label_Initialization) Read $[Version] from the csproj'
env:
DotNet_MainProjectPath: $(DotNet_MainProjectPath)
# If $(PublishRelease) != "true" then compute $(FullVersion) as $(Version)-$(Build.BuildNumber)
- task: VariableTransformTask@1
displayName: '$(Label_Initialization) Compute $[FullVersion] when $[PublishRelease] is not true'
inputs:
value: '$(Version)-$(Build.BuildNumber)'
variableName: 'FullVersion'
IsSecret: false
transformAction: 'none'
condition: ne(variables['PublishRelease'], 'true')
# If $(PublishRelease) == "true" then compute $(FullVersion) as $(Version)
- task: VariableTransformTask@1
displayName: '$(Label_Initialization) Compute $[FullVersion] when $[PublishRelease] is "true"'
inputs:
value: '$(Version)'
variableName: 'FullVersion'
IsSecret: false
transformAction: 'none'
condition: eq(variables['PublishRelease'], 'true')