I would like to restrict these to devices with "device_has": "EMAC", but
the framework doesn't currently permit that. Revisit as more drivers
are EMAC-enabled or if the framework changes.
All the examples cloned from Mercurial should use the new
os.mbed.com domain. Thus update corrects that.
A new option has been added to the update.py script , -s which shows
the status of any PRs raised against the examples that are tagged with
the current release label.
Previously the script used
cmd =['git','checkout', branch]
syntax. This does not work well cross platform. The solution it to
actually use strings. E.g.
cmd = "git checkout " + branch
Currently when checking if the destination branch already exists the
command 'git branch' is used. This only returns local branches. What is
actually required is the list of remote branches. This can be obtained
by the command 'git branch -r' and filtering the result.
Previously if updating a branch in the ARMmbed version of an example
repo, the branch would be created initially from master. This update
allows the new branch to be created by any pre-existing branch.
This update also moves the branch / fork / tag configuration data to the
json config file. It thus simplifies the command line.
-b on its own now indicates use the branch information in the config
-f on its own now indicates use the fork information in the config
The function headers have been updated to follow the standard format
that should be being used for tools in mbed. This is a one line summary
followed by a descriptive block with more detail.
Updated the handling of the main function so that the logger becomes
global and thus works across all the functions. This has been tested
with both the fork and branch options, and for levels INFO and DEBUG.
Added the ability to specify a branch to update rather than a fork
Replaced print commands with the use of a logger
Updated the run_cmd functions in line with previous improvements
example specified in the supplied .json file, in a user specified fork.
A pull request is then made from each fork to the ARMmbed master repo.
New usage:
python update.py <args>
Where <args> are:
[-c <file.json>] optional argument for example list, default
example.json
-U <github user with forked repos>
-T <github authorisation token>
tag
If an example's GitHub repository contains multiple child examples, the
script was incorrectly filtering out all the child examples when
compiling and exporting. This patch now handles this case correctly.
This adds an example clone and deploy step that allows you to modify
each top level repository before pulling in the rest of the example's
dependencies. This allows us to not pull in a copy of mbed-os for each
example in CI and instead symbolic link the already cloned copy, saving
valuable time and disk space
Adding the new compile option allows the marking of a set of examples to
indicate whether they should be compiled or not. For the update process
examples that are not compiled will not be auto updated irrespective of
that setting.
Other changes to make return logic from some functions in update.py more
efficient and some typos in the lib file.
Changes:
Refactor examples.py to add a new command line option to provide an update
tag.
Refactor examples.py to add new functionality to update the version of
mbed-os in the examples to a supplied tag.
Refactor examples.py to make cloning the example repos, updating their
mbed-os version and compiling, into library functions and move to a new
library module.
Refactor the format of the examples.json file to make it compatible with
both examples.py and update.py.
Refactor update.py so that examples are test compiled prior to updating.
Refactor update.py so that only examples tagged as auto-updatable and that
fully compile are automatically updated.
As mbed-events is being brought into the mbed-os tree, the examples
using the external mbed-events library will fail due to duplicate
definitions.
The tests for BLE examples will be readded after the examples are
updated to only use the mbed-events library in the mbed-os tree.