mirror of https://github.com/ARMmbed/mbed-os.git
update mbed-os in selected examples
parent
6855da6b9a
commit
fd80f40851
|
@ -119,7 +119,7 @@ def do_compile(args, config):
|
||||||
|
|
||||||
def do_versionning(args, config):
|
def do_versionning(args, config):
|
||||||
""" Test update the mbed-os to the version specified by the tag """
|
""" Test update the mbed-os to the version specified by the tag """
|
||||||
lib.update_mbedos_version(config, args.tag)
|
lib.update_mbedos_version(config, args.tag, args.example)
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -382,7 +382,7 @@ def compile_repos(config, toolchains, targets, examples):
|
||||||
return results
|
return results
|
||||||
|
|
||||||
|
|
||||||
def update_mbedos_version(config, tag, example):
|
def update_mbedos_version(config, tag, examples):
|
||||||
""" For each example repo identified in the config json object, update the version of
|
""" For each example repo identified in the config json object, update the version of
|
||||||
mbed-os to that specified by the supplied GitHub tag. This function assumes that each
|
mbed-os to that specified by the supplied GitHub tag. This function assumes that each
|
||||||
example repo has already been cloned.
|
example repo has already been cloned.
|
||||||
|
@ -394,8 +394,10 @@ def update_mbedos_version(config, tag, example):
|
||||||
"""
|
"""
|
||||||
print("Updating mbed-os in examples to version %s\n" % tag)
|
print("Updating mbed-os in examples to version %s\n" % tag)
|
||||||
for example in config['examples']:
|
for example in config['examples']:
|
||||||
for repo_info in get_repo_list(example):
|
if example['name'] not in examples:
|
||||||
update_dir = basename(repo_info['repo']) + "/mbed-os"
|
continue
|
||||||
|
for repo in get_repo_list(example):
|
||||||
|
update_dir = basename(repo) + "/mbed-os"
|
||||||
print("\nChanging dir to %s\n" % update_dir)
|
print("\nChanging dir to %s\n" % update_dir)
|
||||||
os.chdir(update_dir)
|
os.chdir(update_dir)
|
||||||
subprocess.call(["mbed-cli", "update", tag, "--clean"])
|
subprocess.call(["mbed-cli", "update", tag, "--clean"])
|
||||||
|
|
Loading…
Reference in New Issue