From f83d9892e4260484fecbc797f31555d0ee1b7219 Mon Sep 17 00:00:00 2001 From: github-actions Date: Mon, 6 Nov 2023 05:03:22 +0100 Subject: [PATCH] fix error --- .github/workflows/handle-versioning-accross-branches.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/handle-versioning-accross-branches.yml b/.github/workflows/handle-versioning-accross-branches.yml index ef02434..7906636 100644 --- a/.github/workflows/handle-versioning-accross-branches.yml +++ b/.github/workflows/handle-versioning-accross-branches.yml @@ -8,9 +8,14 @@ jobs: extension-versioning: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: git-actions/set-user@v1 + - name: Prevent branch warnings + run: | + # config git advice.detachedHead to false + git config advice.detachedHead false + - name: Get highest version number accross all branches id: get-version shell: pwsh @@ -38,7 +43,7 @@ jobs: git checkout $branch # get the semantic version number from the vss-extension-dev.json file - $version = Get-Content -Path "src/$branch/vss-extension.json" | ConvertFrom-Json | Select-Object -ExpandProperty version + $version = Get-Content -Path "vss-extension.json" | ConvertFrom-Json | Select-Object -ExpandProperty version Write-Host "Found version: [$version] in branch: [$branch]" # check if the version is semantically higher than the highest version using SemVer