-
Notifications
You must be signed in to change notification settings - Fork 3k
build api: fix release version #12982
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c489c21
caf58a7
6e59bdd
810b026
59db9f6
5df3c91
07084a5
d6fbda3
9b4cddd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -400,7 +400,7 @@ def transform_release_toolchains(target, version): | |
else: | ||
return target.supported_toolchains | ||
|
||
def get_mbed_official_release(version): | ||
def get_mbed_official_release(version, profile=None): | ||
""" Given a release version string, return a tuple that contains a target | ||
and the supported toolchains for that release. | ||
Ex. Given '2', return (('LPC1768', ('ARM', 'GCC_ARM')), | ||
|
@@ -411,26 +411,26 @@ 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 empty 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': | ||
return tuple(tuple([])) | ||
|
||
mbed_official_release = ( | ||
tuple( | ||
tuple( | ||
[ | ||
TARGET_MAP[target].name, | ||
tuple(transform_release_toolchains( | ||
TARGET_MAP[target], version)) | ||
tuple(['ARM', 'GCC_ARM']) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just wonder why do we use hard-coded tuple here? instead of calling the function? and IAR been dropped? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wanted to avoid refactoring at the moment (so changes just to one function to get the functionality needed). |
||
] | ||
) for target in TARGET_NAMES \ | ||
if (hasattr(TARGET_MAP[target], 'release_versions') | ||
and version in TARGET_MAP[target].release_versions) | ||
if not profile or profile in TARGET_MAP[target].supported_application_profiles | ||
) | ||
) | ||
|
||
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): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure the syntax is correct here. Can you run the script with your changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was checking what CI expected and seems to be as it is here. will study CI results once we get some, if all is being tested as it should