From 7632e63f46afee08eea9dd6630e17d360f3fbd7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Sun, 14 Dec 2025 12:22:22 -0300 Subject: [PATCH] Should fix patch_commit_number.ps1 call (shallow clone cannot find a proper commit number for the nightly release). --- .github/workflows/ecode-nightly.yml | 24 ++++++------------------ projects/scripts/patch_commit_number.ps1 | 5 ++++- 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ecode-nightly.yml b/.github/workflows/ecode-nightly.yml index 3719a0bb8..39ee6bc69 100644 --- a/.github/workflows/ecode-nightly.yml +++ b/.github/workflows/ecode-nightly.yml @@ -434,15 +434,9 @@ jobs: shell: pwsh run: | git config --system core.autocrlf false - - name: Checkout repository - uses: actions/checkout@v3 - with: - ref: ${{ github.ref }} - fetch-depth: 2 - - name: Checkout submodules - shell: pwsh - run: | - git submodule update --init --recursive + - name: Checkout Code + uses: actions/checkout@v4 + with: { fetch-depth: 0, submodules: 'recursive' } - name: Build shell: pwsh run: | @@ -470,15 +464,9 @@ jobs: shell: pwsh run: | git config --system core.autocrlf false - - name: Checkout repository - uses: actions/checkout@v3 - with: - ref: ${{ github.ref }} - fetch-depth: 2 - - name: Checkout submodules - shell: pwsh - run: | - git submodule update --init --recursive + - name: Checkout Code + uses: actions/checkout@v4 + with: { fetch-depth: 0, submodules: 'recursive' } - name: Build shell: pwsh run: | diff --git a/projects/scripts/patch_commit_number.ps1 b/projects/scripts/patch_commit_number.ps1 index 83ef39aa9..ccde6c273 100644 --- a/projects/scripts/patch_commit_number.ps1 +++ b/projects/scripts/patch_commit_number.ps1 @@ -2,7 +2,10 @@ Set-Location (Resolve-Path "$PSScriptRoot\..\..") $COMMIT_NUMBER = git rev-list "$((git tag --sort=-creatordate | Select-String ecode | Select-Object -First 1).Line)..HEAD" --count -if ($LASTEXITCODE) { exit $LASTEXITCODE } +if ($LASTEXITCODE) { + Write-Error "Error: git binary not found" + exit $LASTEXITCODE +} $FILE_PATH = ".\src\tools\ecode\version.hpp"