Skip to content

Commit

Permalink
pwsh for release (#4638)
Browse files Browse the repository at this point in the history
Co-authored-by: Aleksandr Levochkin <107044793+aleksandrlevochkin@users.noreply.github.com>
  • Loading branch information
DenisRumyantsev and aleksandrlevochkin authored Feb 7, 2024
1 parent 62d473c commit 4dff9a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .azure-pipelines/scripts/switch-branch.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
git config user.email "azure-pipelines-bot@microsoft.com"
git config user.name "azure-pipelines-bot"

git checkout -f origin/$env:TARGET_BRANCH

if ($LASTEXITCODE -ne 0){
Write-Error "git checkout failed with exit code $LASTEXITCODE" -ErrorAction Stop
}
4 changes: 2 additions & 2 deletions .vsts.release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ extends:
- checkout: self
clean: true

- task: Bash@3
- task: PowerShell@2
displayName: Switch to release branch
inputs:
filePath: .azure-pipelines/scripts/switch-branch.sh
filePath: .azure-pipelines/scripts/switch-branch.ps1
env:
TARGET_BRANCH: $(ReleaseBranch)

Expand Down

0 comments on commit 4dff9a5

Please sign in to comment.