From 4f92725283dd4f6e2a99be37ffdc581f015a2da1 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Tue, 3 Sep 2019 17:38:40 +0200 Subject: Fix buildbot unsuccessfully trying to update Blender repository for branches --- build_files/utils/make_update.py | 46 ++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 18 deletions(-) (limited to 'build_files/utils/make_update.py') 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"]) -- cgit v1.2.3