forked from bartvdbraak/blender
make.bat: Add option to only update sources from git.
SVN takes a long time to sync even if there are no updates, the `code_update` parameter gives the option opt out of the SVN updates. This is a developer option, people just wanting to build blender and not do any development are highly recommended to keep using the `update` method.
This commit is contained in:
parent
94db2c1f32
commit
db3f3d4d23
@ -77,6 +77,12 @@ if NOT "%1" == "" (
|
||||
REM Non-Build Commands
|
||||
) else if "%1" == "update" (
|
||||
SET BUILD_UPDATE=1
|
||||
set BUILD_UPDATE_SVN=1
|
||||
set BUILD_UPDATE_GIT=1
|
||||
) else if "%1" == "code_update" (
|
||||
SET BUILD_UPDATE=1
|
||||
set BUILD_UPDATE_SVN=0
|
||||
set BUILD_UPDATE_GIT=1
|
||||
) else if "%1" == "ninja" (
|
||||
SET BUILD_WITH_NINJA=1
|
||||
) else if "%1" == "clean" (
|
||||
|
@ -18,6 +18,8 @@ set WINDOWS_ARCH=
|
||||
set TESTS_CMAKE_ARGS=
|
||||
set VSWHERE_ARGS=
|
||||
set BUILD_UPDATE=
|
||||
set BUILD_UPDATE_GIT=
|
||||
set BUILD_UPDATE_SVN=
|
||||
set BUILD_SHOW_HASHES=
|
||||
set SHOW_HELP=
|
||||
set BUILD_WITH_NINJA=
|
||||
|
@ -9,7 +9,8 @@ echo - bpy
|
||||
echo.
|
||||
echo Utilities ^(not associated with building^)
|
||||
echo - clean ^(Target must be set^)
|
||||
echo - update
|
||||
echo - update ^(Update both SVN and GIT^)
|
||||
echo - code_update ^(Update only GIT^)
|
||||
echo - nobuild ^(only generate project files^)
|
||||
echo - showhash ^(Show git hashes of source tree^)
|
||||
echo.
|
||||
|
@ -1,16 +1,18 @@
|
||||
if "%SVN%" == "" (
|
||||
echo svn not found, cannot update libraries
|
||||
goto UPDATE_GIT
|
||||
if "%BUILD_UPDATE_SVN%" == "1" (
|
||||
if "%SVN%" == "" (
|
||||
echo svn not found, cannot update libraries
|
||||
goto UPDATE_GIT
|
||||
)
|
||||
"%SVN%" up "%BLENDER_DIR%/../lib/*"
|
||||
)
|
||||
"%SVN%" up "%BLENDER_DIR%/../lib/*"
|
||||
|
||||
:UPDATE_GIT
|
||||
|
||||
if "%GIT%" == "" (
|
||||
echo Git not found, cannot update code
|
||||
goto EOF
|
||||
if "%BUILD_UPDATE_GIT%" == "1" (
|
||||
if "%GIT%" == "" (
|
||||
echo Git not found, cannot update code
|
||||
goto EOF
|
||||
)
|
||||
"%GIT%" pull --rebase
|
||||
"%GIT%" submodule foreach git pull --rebase origin master
|
||||
)
|
||||
"%GIT%" pull --rebase
|
||||
"%GIT%" submodule foreach git pull --rebase origin master
|
||||
|
||||
:EOF
|
||||
|
Loading…
Reference in New Issue
Block a user