Skip to content

Commit

Permalink
Update version check script in workflow to prevent issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rajbos committed Dec 3, 2023
1 parent 677f4cf commit c4d515f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/handle-versioning-accross-branches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,14 @@ jobs:
id: get-version
shell: pwsh
env:
AZURE_DEVOPS_CREATE_PAT: ${{ secrets.AZURE_DEVOPS_CREATE_PAT}}
AZURE_DEVOPS_PAT: ${{ secrets.AZURE_DEVOPS_PAT}}
run: |
# get the last updated version for this extension from the server
$output = $(tfx extension show --token $env:AZURE_DEVOPS_CREATE_PAT --vsix $vsix --publisher "RobBos" --extension-id "GHAzDoWidget-DEV" --output json | ConvertFrom-Json)
$output = $(tfx extension show --token $env:AZURE_DEVOPS_PAT --vsix $vsix --publisher "RobBos" --extension-id "GHAzDoWidget-DEV" --output json | ConvertFrom-Json)
if ($null -eq $output) {
Write-Host "No versions found on the server"
exit 1
}
$lastVersion = ($output.versions | Sort-Object -Property lastUpdated -Descending)[0]
Write-Host "Last version: [$($lastVersion.version)] from server"
Expand Down

0 comments on commit c4d515f

Please sign in to comment.