bbcmicrobit / micropython

Port of MicroPython for the BBC micro:bit
https://microbit-micropython.readthedocs.io
Other
603 stars 284 forks source link

Version included in Yotta module.json #581

Closed microbit-carlos closed 5 years ago

microbit-carlos commented 5 years ago

The module.json Yotta file has its version value currently set to 0.5.0:

https://github.com/bbcmicrobit/micropython/blob/e411337cfe1edf6f86ee70709e81c49a157301fb/module.json#L3

The source-of-truth for the micro:bit MicroPython version is in the mpconfigport.h file: https://github.com/bbcmicrobit/micropython/blob/e411337cfe1edf6f86ee70709e81c49a157301fb/inc/microbit/mpconfigport.h#L167

The docs currently read the module.json file, and for that reason the sphinx html output has 0.5.0 in their title: https://github.com/bbcmicrobit/micropython/blob/e411337cfe1edf6f86ee70709e81c49a157301fb/docs/conf.py#L63-L68

We should resolve this conflict, by either figuring out a way to keep those to versions in sync, or updating the sphinx configuration script to retrieve the version from mpconfigport.h instead of the module.json file.

dpgeorge commented 5 years ago

It would be good to have module.json and mpconfigport.h in sync together with the version/release number. But I don't think this is possible to do automatically (eg include one in the other) so we would just have to do it by hand, ie update both when the version changes. In that case the docs/conf.py can stay the same and just read module.json.

microbit-carlos commented 5 years ago

Sounds, good, so we will start updating both files on each release.