Fix source indexing

`actions/checkout@v6` clones repo from URL that doesn't contain `.git`
at the end.

We were removing last 4 characters of the URL which resulted in wrong `REPO_URL`
in source index and debugger was thus unable to fetch sources.

The fix is to remove last 4 characters of URL only if there is `.git` at the end.
This commit is contained in:
ge0rdi
2026-08-30 13:27:52 +02:00
parent c9e791fc79
commit f66d5ce50b
+2 -2
View File
@@ -12,8 +12,8 @@ set SRC_ROOT=%~fdp1
rem get repo url
for /f %%A in ('git remote get-url origin') do set REPO_URL=%%A
rem remove .git from the end
set REPO_URL=%REPO_URL:~0,-4%
rem remove eventual .git from the end
if /I "%REPO_URL:~-4%"==".git" set "REPO_URL=%REPO_URL:~0,-4%"
rem get actual commit id
for /f %%A in ('git rev-parse HEAD') do set COMMIT=%%A