diff options
author | Damien George <damien.p.george@gmail.com> | 2014-05-03 19:02:14 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-05-03 19:02:14 +0100 |
commit | 977a0ce287b1c45c59f9f8d75d573695abcd3f2a (patch) | |
tree | ba217772826173a09d088569f6b7fda2f92a774c /py | |
parent | b4bb3fdb9cfcb76fb5b64e0a031a70c807ac7395 (diff) | |
download | micropython-977a0ce287b1c45c59f9f8d75d573695abcd3f2a.tar.gz micropython-977a0ce287b1c45c59f9f8d75d573695abcd3f2a.zip |
py: Print tag/version/git describe in uPy banner.
Diffstat (limited to 'py')
-rwxr-xr-x | py/py-version.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/py/py-version.sh b/py/py-version.sh index f574b574f4..53063381f5 100755 --- a/py/py-version.sh +++ b/py/py-version.sh @@ -1,5 +1,6 @@ #!/bin/bash +git_tag="$(git describe || echo unknown)" git_hash="$(git rev-parse --short HEAD 2> /dev/null || echo unknown)" git_files_are_clean=1 # Check if there are any modified files. @@ -11,6 +12,7 @@ if [ "${git_files_are_clean}" != "1" ]; then fi cat <<EOF // This file was generated by py/py-version.sh +#define MICROPY_GIT_TAG "${git_tag}" #define MICROPY_GIT_HASH "${git_hash}" #define MICROPY_BUILD_DATE "$(date '+%Y-%m-%d')" EOF |