Mike Wadsten
c711c0049e
py/makeversionhdr.py: Match only git tags which look like versions.
...
Some downstream projects may use tags in their repositories for more than
just designating MicroPython releases. In those cases, the
makeversionhdr.py script would end up using a different tag than intended.
So tell `git describe` to only match tags that look like a MicroPython
version tag, such as `v1.12` or `v2.0`.
2020-10-01 11:01:43 +10:00
Damien George
69661f3343
all: Reformat C and Python source code with tools/codeformat.py.
...
This is run with uncrustify 0.70.1, and black 19.10b0.
2020-02-28 10:33:03 +11:00
Damien George
7cd59c5bc3
py/mpconfig: Move MICROPY_VERSION macros to static ones in mpconfig.h.
...
It's more robust to have the version defined statically in a header file,
rather than dynamically generating it via git using a git tag. In case
git doesn't exist, or a different source control tool is used, it's
important to still have the uPy version number available.
2018-12-22 01:40:38 +11:00
Damien George
6af4515969
py: Use "GEN" consistently for describing files generated in the build.
2018-02-22 12:48:51 +11:00
Damien George
b51919f5b7
py/makeversionhdr.py: Update to parse new release line in docs/conf.py.
...
The line in docs/conf.py with the release/version number was recently
changed and this patch makes the makeversionhdr.py script work again.
2017-07-04 22:37:41 +10:00
omtinez
17c649da3d
py/makeversionhdr.py: Work with backslashes in paths.
...
This script may be called by Windows IDEs (e.g. Visual Studio) and be passed
paths with backslashes.
2015-10-30 11:34:53 +03:00
Damien George
94ef8879cd
py/makeversionhdr.py: Use returncode attr to be Python2.7 compat.
2015-08-12 23:28:16 +01:00
Damien George
0d5d16074f
py/makeversionhdr.py: Fallback to using docs version if no git repo.
...
Addresses issue #1420 .
2015-08-11 12:27:38 +01:00
Damien George
26b512ea1b
py: Get makeqstrdata.py and makeversionhdr.py running under Python 2.6.
...
These scripts should run under as wide a range of Python versions as
possible.
2015-05-30 23:11:16 +01:00
Damien George
1a97f6721f
py: Make makeversionhdr.py extract version from docs/conf.py if no git.
...
Addresses issue #1285 .
2015-05-25 13:26:47 +01:00
Damien George
95f53461c2
py: Replace py-version.sh with makeversionhdr.py, written in Python.
...
Also rename py-version.h to mpversion.h for consistency with mpconfig.h.
2015-04-28 23:52:36 +01:00