diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-03 18:38:40 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-09-03 19:01:57 +0300 |
commit | 4f92725283dd4f6e2a99be37ffdc581f015a2da1 (patch) | |
tree | 2a6e941f801391ecf23d2a2b946bbdfb73998463 | |
parent | bc1781cf6a3c283f19a53a959f650692bf85c76d (diff) |
Fix buildbot unsuccessfully trying to update Blender repository for branches
-rw-r--r-- | build_files/buildbot/slave_update.py | 2 | ||||
-rwxr-xr-x | build_files/utils/make_update.py | 46 | ||||
-rw-r--r-- | build_files/windows/parse_arguments.cmd | 2 |
3 files changed, 30 insertions, 20 deletions
diff --git a/build_files/buildbot/slave_update.py b/build_files/buildbot/slave_update.py index 16b18de3a5d..42633e1e529 100644 --- a/build_files/buildbot/slave_update.py +++ b/build_files/buildbot/slave_update.py @@ -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']) diff --git a/build_files/utils/make_update.py b/build_files/utils/make_update.py index 85fff2ba606..c089ca96b0c 100755 --- a/build_files/utils/make_update.py +++ b/build_files/utils/make_update.py @@ -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 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, "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"]) +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) + + call([git_command, "pull", "--rebase"]) + +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) + + 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"]) diff --git a/build_files/windows/parse_arguments.cmd b/build_files/windows/parse_arguments.cmd index cb375b7fc9f..acbbc355f57 100644 --- a/build_files/windows/parse_arguments.cmd +++ b/build_files/windows/parse_arguments.cmd @@ -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" ( |