[Bf-blender-cvs] [db3f3d4d236] master: make.bat: Add option to only update sources from git.

Ray Molenkamp noreply at git.blender.org
Sat May 18 18:34:36 CEST 2019


Commit: db3f3d4d236f873aaadf0cbefee5139a7887d9af
Author: Ray Molenkamp
Date:   Sat May 18 10:34:33 2019 -0600
Branches: master
https://developer.blender.org/rBdb3f3d4d236f873aaadf0cbefee5139a7887d9af

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.

===================================================================

M	build_files/windows/parse_arguments.cmd
M	build_files/windows/reset_variables.cmd
M	build_files/windows/show_help.cmd
M	build_files/windows/update_sources.cmd

===================================================================

diff --git a/build_files/windows/parse_arguments.cmd b/build_files/windows/parse_arguments.cmd
index 98c5708c216..a231d5b16be 100644
--- a/build_files/windows/parse_arguments.cmd
+++ b/build_files/windows/parse_arguments.cmd
@@ -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" (
diff --git a/build_files/windows/reset_variables.cmd b/build_files/windows/reset_variables.cmd
index efac15785ca..631618040ec 100644
--- a/build_files/windows/reset_variables.cmd
+++ b/build_files/windows/reset_variables.cmd
@@ -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=
diff --git a/build_files/windows/show_help.cmd b/build_files/windows/show_help.cmd
index 6eaa4e6c56d..77852a7f02e 100644
--- a/build_files/windows/show_help.cmd
+++ b/build_files/windows/show_help.cmd
@@ -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.
diff --git a/build_files/windows/update_sources.cmd b/build_files/windows/update_sources.cmd
index 3906af27cb9..1f571eaf92d 100644
--- a/build_files/windows/update_sources.cmd
+++ b/build_files/windows/update_sources.cmd
@@ -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



More information about the Bf-blender-cvs mailing list