Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of mbed-sdk-tools by
Diff: build_api.py
- Revision:
- 2:07730b0f452c
- Parent:
- 1:a99c8e460c5c
- Child:
- 7:5af61d55adbe
diff -r a99c8e460c5c -r 07730b0f452c build_api.py --- a/build_api.py Fri May 20 20:16:44 2016 +0100 +++ b/build_api.py Fri May 20 22:27:03 2016 +0100 @@ -89,9 +89,12 @@ src_paths = [src_paths[0]] + list(set(src_paths[1:])) project_name = basename(abspath(src_paths[0] if src_paths[0] != "." and src_paths[0] != "./" else getcwd())) + for path in src_paths: + profile = get_build_profile(path) + # Toolchain instance try: - toolchain = TOOLCHAIN_CLASSES[toolchain_name](target, options, notify, macros, silent, extra_verbose=extra_verbose) + toolchain = TOOLCHAIN_CLASSES[toolchain_name](target, options, notify, macros, silent, extra_verbose=extra_verbose, profile=profile) except KeyError as e: raise KeyError("Toolchain %s not supported" % toolchain_name) @@ -99,9 +102,6 @@ toolchain.jobs = jobs toolchain.build_all = clean - for path in src_paths: - toolchain.PROFILE = get_build_profile(path, toolchain_name) - if name is None: # We will use default project name based on project folder name name = project_name @@ -754,7 +754,7 @@ with open(filename, 'w+') as f: f.write(template.render(failing_builds=build_report_failing, passing_builds=build_report_passing)) -def get_build_profile(path, toolchain_name): +def get_build_profile(path): profile = None builds = get_build_ids(path) for build in builds: @@ -766,7 +766,7 @@ elif idx <= 43: profile = 'v1' elif idx <= 68: - profile = 'v2' + profile = 'v2' elif idx <= 76: profile = 'v3' elif idx <= 105: