1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-12-25 06:23:53 +01:00

Merge pull request #21734 from AnnsAnns/extend_print_version

dist/tools/ci: include rust, node and git commit in print-version
This commit is contained in:
crasbe 2025-10-01 12:02:53 +00:00 committed by GitHub
commit 669724e010
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -109,6 +109,21 @@ avr_libc_version() {
fi
}
printf "\n"
printf "%s\n" "RIOT version information"
printf "%s\n" "----------------------------"
if [ -d .git ]; then
RIOT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
RIOT_COMMIT_HASH=$(git rev-parse HEAD)
RIOT_COMMIT_DATE=$(git log -1 --format=%cd --date=short)
else
RIOT_BRANCH="unknown (not a git repository)"
RIOT_COMMIT_HASH="unknown (not a git repository)"
RIOT_COMMIT_DATE="unknown (not a git repository)"
fi
printf "%25s: %s\n" "RIOT branch" "$RIOT_BRANCH"
printf "%25s: %s\n" "RIOT commit hash" "$RIOT_COMMIT_HASH"
printf "%25s: %s\n" "RIOT commit date" "$RIOT_COMMIT_DATE"
printf "\n"
# print operating system information
printf "%s\n" "Operating System Environment"
@ -129,6 +144,7 @@ for p in \
riscv-none-elf \
riscv64-unknown-elf \
riscv32-esp-elf \
riscv32-unknown-elf \
xtensa-esp32-elf \
xtensa-esp32s2-elf \
xtensa-esp32s3-elf \
@ -147,6 +163,7 @@ for p in \
riscv-none-elf \
riscv64-unknown-elf \
riscv32-esp-elf \
riscv32-unknown-elf \
xtensa-esp32-elf \
xtensa-esp32s2-elf \
xtensa-esp32s3-elf \
@ -171,6 +188,12 @@ for c in \
python \
python2 \
python3 \
rustup \
cargo \
rustc \
c2rust \
node \
npm \
; do
printf "%25s: %s\n" "$c" "$(get_cmd_version "${c}")"
done