mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 12:40:15 +01:00
py: Print tag/version/git describe in uPy banner.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user