From 8b0e01c154d7d5184988e1fc20837861343ea732 Mon Sep 17 00:00:00 2001 From: Apaczer <94932128+Apaczer@users.noreply.github.com> Date: Wed, 16 Apr 2025 20:55:02 +0200 Subject: [PATCH] BAORD: genimage.sh: don't write hash on dirty (#163) --- board/miyoo/scripts/genimage.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/board/miyoo/scripts/genimage.sh b/board/miyoo/scripts/genimage.sh index b8789d7a..70c23dcb 100755 --- a/board/miyoo/scripts/genimage.sh +++ b/board/miyoo/scripts/genimage.sh @@ -13,7 +13,11 @@ if test $(git tag | wc -l) -ne 0; then BR2_ITERATION="$(git rev-list --count ${BR2_TAG}..HEAD)" fi -BR2_HASH="$(git rev-parse --short HEAD)" # not using print-version from BR2_VERSION_FULL +if git diff-index --quiet HEAD; then + BR2_HASH="$(git rev-parse --short HEAD)" # not using print-version from BR2_VERSION_FULL +else + BR2_HASH="dirty" +fi if (test "$CFW_HASH" == "$BR2_HASH" || test -z "$CFW_HASH"); then CFW_TYPE="br2_dist" CFW_HASH="$BR2_HASH"