From bab13ae57febeaa46865d81a7d1e8aef6bc9346d Mon Sep 17 00:00:00 2001 From: David Karoly Date: Fri, 1 Apr 2022 18:56:38 +0200 Subject: [PATCH] u-boot: add git describe to README --- u-boot/tools/README.template | 2 +- u-boot/tools/build | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/u-boot/tools/README.template b/u-boot/tools/README.template index 54eae2b..5865466 100644 --- a/u-boot/tools/README.template +++ b/u-boot/tools/README.template @@ -16,7 +16,7 @@ This section tracks the u-boot revision within this repo. * **License:** GPLv2 * **Source Code:** %%GIT_REPO%% * **Date:** %%GIT_DATE%% - * **GIT Hash:** %%GIT_HASH%% + * **GIT Commit:** %%GIT_HASH%% %%GIT_DESC%% * **Toolchain:** http://cgit.haiku-os.org/buildtools/ * **Toolchain version:** %%CROSS_TOOL_VERSION%% * **Build Commands:** diff --git a/u-boot/tools/build b/u-boot/tools/build index 7f801a3..2435c8f 100755 --- a/u-boot/tools/build +++ b/u-boot/tools/build @@ -59,6 +59,7 @@ fi echo "Calculating dates..." GIT_DATE=$(git -C $TMP log -1 --format=%cd) GIT_HASH=$(git -C $TMP log -1 --format=%H) +GIT_DESC=$(git -C $TMP describe) echo "Locating work..." WORK_QUEUE=$(find $TARGET_ARCH/ -mindepth 1 -type d) @@ -135,6 +136,7 @@ for dir in $WORK_QUEUE; do sed -i "s^%%GIT_REPO%%^$GIT_REPO^g" $dir/README.md sed -i "s^%%GIT_DATE%%^$GIT_DATE^g" $dir/README.md sed -i "s^%%GIT_HASH%%^$GIT_HASH^g" $dir/README.md + sed -i "s^%%GIT_DESC%%^$GIT_DESC^g" $dir/README.md sed -i "s^%%BOARD%%^$NAME^g" $dir/README.md sed -i "s^%%FILES%%^$FILES^g" $dir/README.md sed -i "s^%%CONFIG%%^$CONFIG^g" $dir/README.md