mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-02 13:04:49 +00:00
build-deps.cmd: GitCloneAndCheckoutRevision - always checkout the revision, so that users don't have the nuke their existing clones before running the script.
This commit is contained in:
+6
-4
@@ -395,15 +395,17 @@ IF NOT EXIST "%2". (
|
|||||||
call cecho.cmd 0 13 "Cloning %DEPENDENCY_NAME% into %2."
|
call cecho.cmd 0 13 "Cloning %DEPENDENCY_NAME% into %2."
|
||||||
pushd "%DEPS_DIR%"
|
pushd "%DEPS_DIR%"
|
||||||
call git clone %1 %2
|
call git clone %1 %2
|
||||||
pushd "%2"
|
|
||||||
call cecho.cmd 0 13 "Checking out %DEPENDENCY_NAME% revision %3."
|
|
||||||
call git checkout %3
|
|
||||||
set RET=%ERRORLEVEL%
|
set RET=%ERRORLEVEL%
|
||||||
|
if not %RET%==0 exit /b %RET%
|
||||||
popd
|
popd
|
||||||
) ELSE (
|
) ELSE (
|
||||||
call cecho.cmd 0 13 "%DEPENDENCY_NAME% already cloned. Skipping."
|
call cecho.cmd 0 13 "%DEPENDENCY_NAME% already cloned."
|
||||||
set RET=0
|
set RET=0
|
||||||
)
|
)
|
||||||
|
pushd "%2"
|
||||||
|
call cecho.cmd 0 13 "Checking out %DEPENDENCY_NAME% revision %3."
|
||||||
|
call git checkout %3
|
||||||
|
set RET=%ERRORLEVEL%
|
||||||
popd
|
popd
|
||||||
exit /b %RET%
|
exit /b %RET%
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user