mirror of
https://github.com/Open-Shell/Open-Shell-Menu.git
synced 2026-10-08 11:39:06 +11:00
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:
@@ -12,8 +12,8 @@ set SRC_ROOT=%~fdp1
|
|||||||
|
|
||||||
rem get repo url
|
rem get repo url
|
||||||
for /f %%A in ('git remote get-url origin') do set REPO_URL=%%A
|
for /f %%A in ('git remote get-url origin') do set REPO_URL=%%A
|
||||||
rem remove .git from the end
|
rem remove eventual .git from the end
|
||||||
set REPO_URL=%REPO_URL:~0,-4%
|
if /I "%REPO_URL:~-4%"==".git" set "REPO_URL=%REPO_URL:~0,-4%"
|
||||||
|
|
||||||
rem get actual commit id
|
rem get actual commit id
|
||||||
for /f %%A in ('git rev-parse HEAD') do set COMMIT=%%A
|
for /f %%A in ('git rev-parse HEAD') do set COMMIT=%%A
|
||||||
|
|||||||
Reference in New Issue
Block a user