kopia lustrzana https://github.com/micropython/micropython
py/makeversionhdr.py: Optionally get git tag and git hash from env vars.
This is handy when you are doing builds outside of the Git repository but still want to record that information. Signed-off-by: David Grayson <davidegrayson@gmail.com>pull/10819/head
rodzic
0098096682
commit
2bcd88d556
|
@ -86,8 +86,11 @@ def get_version_info_from_mpconfig(repo_path):
|
|||
|
||||
|
||||
def make_version_header(repo_path, filename):
|
||||
# Get version info using git, with fallback to py/mpconfig.h
|
||||
info = get_version_info_from_git(repo_path)
|
||||
info = None
|
||||
if "MICROPY_GIT_TAG" in os.environ:
|
||||
info = [os.environ["MICROPY_GIT_TAG"], os.environ["MICROPY_GIT_HASH"]]
|
||||
if info is None:
|
||||
info = get_version_info_from_git(repo_path)
|
||||
if info is None:
|
||||
info = get_version_info_from_mpconfig(repo_path)
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue