ARMmbed / yotta

DEPRECATED: yotta build; better software
Apache License 2.0
164 stars 64 forks source link

add vcs description to build info header #715

Closed bearsh closed 8 years ago

bearsh commented 8 years ago

git describe is quite useful to get a revision info based on the vcs which also honors tags. so let's put this info in a new define into the build info header. for git 'git describe --always --tags' is used, for mercurial a somewhat equivalent found at [1] as mercurial itself doesn't provide a describe subcommand. doc has been updated accordingly. the units test unly checks for a description string longer than 1

[1] http://stackoverflow.com/questions/6693209/is-there-an-equivalent- to-gits-describe-function-for-mercurial

Signed-off-by: Martin Gysel me@bearsh.org

bearsh commented 8 years ago

mmh atm I have no idea why exactly the regression tests fail. maybe the used mercurial version 2.0.2 is too old?

bearsh commented 8 years ago

with mercurial==2.6.2 installed by pip (lowest version available) the test_getDescription test works with python2.7. with python3.x there's a problem installing mercurial by pip

autopulated commented 8 years ago

Thanks for contributing!

It looks like the version of mercurial installed on the CI is 2.0.2, which is rather old (restarted the CircleCI build with an updated mercurial now, we'll see what happens...). I think it's fine for this information to be missing in such an old version, but we should handle the error gracefully (or test the version before calling the command).

Please could you confirm also that you've clicked through our contributor agreement so I can merge.

bearsh commented 8 years ago

contributor agreement accepted....

autopulated commented 8 years ago

:+1: Looks good!

:white_check_mark: verified cla click-through as mbed user bearsh.