trim branch name

This commit is contained in:
MilenaHristova 2023-02-08 17:40:25 +01:00
parent 857d818a83
commit 788c3baed4
2 changed files with 4 additions and 4 deletions

View file

@ -22,7 +22,7 @@ parameters:
variables:
- ${{ if ne(parameters.vmrBranch, ' ') }}:
- name: VmrBranch
value: ${{ parameters.vmrBranch }}
value: ${{ replace(parameters.vmrBranch, ' ', '') }}
- ${{ else }}:
- name: VmrBranch
value: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), 'refs/pull/', '') }}

View file

@ -19,12 +19,12 @@ parameters:
- name: vmrBranch
displayName: dotnet/dotnet branch to push to
type: string
default: ''
default: ' '
variables:
- ${{ if ne(parameters.vmrBranch, '') }}:
- ${{ if ne(parameters.vmrBranch, ' ') }}:
- name: VmrBranch
value: ${{ parameters.vmrBranch }}
value: ${{ replace(parameters.vmrBranch, ' ', '') }}
- ${{ else }}:
- name: VmrBranch
value: ${{ replace(replace(variables['Build.SourceBranch'], 'refs/heads/', ''), 'refs/pull/', '') }}