Skip to content

Commit 42c56d2

Browse files
committed
Update dependencies
1 parent 89f4b44 commit 42c56d2

3 files changed

Lines changed: 16 additions & 31 deletions

File tree

dependency.cmd

Lines changed: 14 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -42,39 +42,24 @@ echo Build %DEP_NAME% (%ARCH_LABEL%)
4242
echo ############################################################
4343
echo.
4444

45-
:: ----- Decide whether to update submodule -----
46-
if /i not "%DO_PULL%"=="true" (
47-
echo Getting current %DEP_NAME% submodule version
48-
git submodule update --init -- %DEP_PATH%
49-
if errorlevel 1 (
50-
echo WARNING: Failed to get current %DEP_NAME% submodule version
51-
)
52-
goto process_lpk
53-
)
54-
55-
echo Checking %DEP_NAME% submodule state
56-
57-
:: Check for local changes in the submodule
58-
git -C %DEP_PATH% diff --quiet
59-
if errorlevel 1 (
60-
echo WARNING: %DEP_NAME% has unstaged changes, skipping submodule update
61-
goto process_lpk
62-
)
63-
64-
:: Check for staged changes in the submodule
65-
git -C %DEP_PATH% diff --cached --quiet
45+
:: ----- Always ensure submodule exists and is cleanly checked out -----
46+
echo Syncing %DEP_NAME% submodule (committed version)
47+
git submodule update --init -- %DEP_PATH%
6648
if errorlevel 1 (
67-
echo WARNING: %DEP_NAME% has staged changes, skipping submodule update
49+
echo WARNING: Failed to initialize/update %DEP_NAME% submodule.
50+
echo Possibly local changes exist or network error.
6851
goto process_lpk
6952
)
7053

71-
:: No local changes – safe to update to the latest branch commit
72-
echo Updating %DEP_NAME% submodule
73-
git submodule update --init --remote -- %DEP_PATH%
74-
if errorlevel 1 (
75-
echo WARNING: %DEP_NAME% submodule update failed, continuing with existing version
76-
) else (
77-
echo %DEP_NAME% submodule updated successfully
54+
:: ----- If pulling requested, move to the latest branch commit -----
55+
if /i "%DO_PULL%"=="true" (
56+
echo Pulling latest %DEP_NAME% from branch %DEP_BRANCH%
57+
git submodule update --remote -- %DEP_PATH%
58+
if errorlevel 1 (
59+
echo WARNING: Failed to update %DEP_NAME% to latest remote commit.
60+
) else (
61+
echo %DEP_NAME% submodule updated to latest commit successfully.
62+
)
7863
)
7964

8065
goto process_lpk

libs/toolkit

Submodule toolkit updated 1 file

0 commit comments

Comments
 (0)