diff --git a/.github/workflows/build-and-test-windows.yml b/.github/workflows/build-and-test-windows.yml index cdb4a9a91..f2d3006f3 100644 --- a/.github/workflows/build-and-test-windows.yml +++ b/.github/workflows/build-and-test-windows.yml @@ -25,11 +25,12 @@ jobs: uses: actions/checkout@v3 - name: Fetch remote branch - run: git fetch --depth=1 origin main - + run: | + git fetch origin main + - name: Prepare environment variables run: | - $env:DT_BUILD_ID = git rev-list --count main + $env:DT_BUILD_ID = (git rev-list --count main) - 1 if ($env:GITHUB_EVENT_NAME -eq 'pull_request') { if ($env:GITHUB_PULL_REQUEST_HEAD_REPO_BRANCH -match '^rel-') { $env:DT_RELEASE = 'True' diff --git a/ci/appveyor.yml b/ci/appveyor.yml index f240d3228..46a46ab5f 100644 --- a/ci/appveyor.yml +++ b/ci/appveyor.yml @@ -134,7 +134,7 @@ build_script: $DEFAULT_PATH = $env:PATH - git fetch --depth=1 origin main + git fetch --depth=10 origin main $MAIN_BUILD_ID = git rev-list --count main