mirror of https://github.com/ARMmbed/mbed-os.git
build api: fix release version
This is non trivial fix as the function is being used outside of this repository. Tools rely on it to return list of targets for 2 or 5. As we removed release_version from many targets, this broke the logic. To keep the logic as it was, without updating all tools out there now, lets just return full set of targets - all are supported. In case for Mbed 2, returning all targets does not make sense, but rather raise an exception here. Not supported. This avoids suprised. If you look at build api functions there are many checks for 2 or 5 so more clean up needed to actually get release_version out of the tools.pull/12982/head
parent
475621ce36
commit
c489c213a7
|
@ -411,26 +411,25 @@ def get_mbed_official_release(version):
|
|||
RELEASE_VERSIONS
|
||||
"""
|
||||
|
||||
# we ignore version for Mbed 6 as all targets in targets.json file are being supported
|
||||
# if someone passes 2, we return emtpy tuple, if 5, we keep the behavior the same as
|
||||
# release version is deprecated and all targets are being supported that are present
|
||||
# in targets.json file
|
||||
|
||||
if version == `2`:
|
||||
raise InvalidReleaseTargetException("Mbed 2 not supported anymore with this version of tools")
|
||||
|
||||
mbed_official_release = (
|
||||
tuple(
|
||||
tuple(
|
||||
[
|
||||
TARGET_MAP[target].name,
|
||||
tuple(transform_release_toolchains(
|
||||
TARGET_MAP[target], version))
|
||||
tuple('ARM', 'GCC_ARM')
|
||||
]
|
||||
) for target in TARGET_NAMES \
|
||||
if (hasattr(TARGET_MAP[target], 'release_versions')
|
||||
and version in TARGET_MAP[target].release_versions)
|
||||
) for target in TARGET_NAMES
|
||||
)
|
||||
)
|
||||
|
||||
for target in mbed_official_release:
|
||||
is_official, reason = is_official_target(target[0], version)
|
||||
|
||||
if not is_official:
|
||||
raise InvalidReleaseTargetException(reason)
|
||||
|
||||
return mbed_official_release
|
||||
|
||||
def target_supports_toolchain(target, toolchain_name):
|
||||
|
|
Loading…
Reference in New Issue