Fix buildbot unsuccessfully trying to update Blender repository for branches
This commit is contained in:
@@ -28,4 +28,4 @@ if __name__ == "__main__":
|
||||
|
||||
# Run make update which handles all libraries and submodules.
|
||||
make_update = os.path.join(builder.blender_dir, "build_files", "utils", "make_update.py")
|
||||
buildbot_utils.call([sys.executable, make_update])
|
||||
buildbot_utils.call([sys.executable, make_update, '--no-blender'])
|
||||
|
||||
@@ -18,13 +18,17 @@ from make_utils import call
|
||||
|
||||
def parse_arguments():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument("--only-code", action="store_true")
|
||||
parser.add_argument("--no-libraries", action="store_true")
|
||||
parser.add_argument("--no-blender", action="store_true")
|
||||
parser.add_argument("--no-submodules", action="store_true")
|
||||
parser.add_argument("--svn-command", default="svn")
|
||||
parser.add_argument("--git-command", default="git")
|
||||
return parser.parse_args()
|
||||
|
||||
args = parse_arguments()
|
||||
only_code = args.only_code
|
||||
no_libraries = args.no_libraries
|
||||
no_blender = args.no_blender
|
||||
no_submodules = args.no_submodules
|
||||
git_command = args.git_command
|
||||
svn_command = args.svn_command
|
||||
svn_non_interactive = [args.svn_command, '--non-interactive']
|
||||
@@ -38,7 +42,7 @@ def print_stage(text):
|
||||
release_version = make_utils.git_branch_release_version(git_command)
|
||||
|
||||
# Setup for precompiled libraries and tests from svn.
|
||||
if not only_code:
|
||||
if not no_libraries:
|
||||
lib_dirpath = os.path.join('..', 'lib')
|
||||
svn_url = make_utils.svn_libraries_base_url(release_version)
|
||||
|
||||
@@ -90,18 +94,24 @@ if not only_code:
|
||||
call(svn_non_interactive + ["update", dirpath])
|
||||
|
||||
# Update blender repository and submodules.
|
||||
print_stage("Updating Blender Git Repository and Submodules")
|
||||
if not no_blender:
|
||||
print_stage("Updating Blender Git Repository")
|
||||
if shutil.which(git_command) is None:
|
||||
sys.stderr.write("git not found, can't update code\n")
|
||||
sys.exit(1)
|
||||
|
||||
if shutil.which(git_command) is None:
|
||||
sys.stderr.write("git not found, can't update code\n")
|
||||
sys.exit(1)
|
||||
call([git_command, "pull", "--rebase"])
|
||||
|
||||
call([git_command, "pull", "--rebase"])
|
||||
call([git_command, "submodule", "update", "--init", "--recursive"])
|
||||
if not no_submodules:
|
||||
print_stage("Updating Submodules")
|
||||
if shutil.which(git_command) is None:
|
||||
sys.stderr.write("git not found, can't update code\n")
|
||||
sys.exit(1)
|
||||
|
||||
if not release_version:
|
||||
# Update submodules to latest master if not building a specific release.
|
||||
# In that case submodules are set to a specific revision, which is checked
|
||||
# out by running "git submodule update".
|
||||
call([git_command, "submodule", "foreach", "git", "checkout", "master"])
|
||||
call([git_command, "submodule", "foreach", "git", "pull", "--rebase", "origin", "master"])
|
||||
call([git_command, "submodule", "update", "--init", "--recursive"])
|
||||
if not release_version:
|
||||
# Update submodules to latest master if not building a specific release.
|
||||
# In that case submodules are set to a specific revision, which is checked
|
||||
# out by running "git submodule update".
|
||||
call([git_command, "submodule", "foreach", "git", "checkout", "master"])
|
||||
call([git_command, "submodule", "foreach", "git", "pull", "--rebase", "origin", "master"])
|
||||
|
||||
@@ -85,7 +85,7 @@ if NOT "%1" == "" (
|
||||
set BUILD_UPDATE_ARGS=
|
||||
) else if "%1" == "code_update" (
|
||||
SET BUILD_UPDATE=1
|
||||
set BUILD_UPDATE_ARGS="--only-code"
|
||||
set BUILD_UPDATE_ARGS="--no-libraries"
|
||||
) else if "%1" == "ninja" (
|
||||
SET BUILD_WITH_NINJA=1
|
||||
) else if "%1" == "clean" (
|
||||
|
||||
Reference in New Issue
Block a user