From be0441295a0338309505799d875fc6794f861c3e Mon Sep 17 00:00:00 2001 From: Siavash Sameni Date: Wed, 8 Apr 2026 14:32:03 +0400 Subject: [PATCH] fix: read git hash outside Docker for Linux build ntfy notification The hash was read inside Docker (/build/source) where .git doesn't exist. Now reads from $BASE_DIR/data/source before Docker runs. Co-Authored-By: Claude Opus 4.6 (1M context) --- scripts/build-linux-docker.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/build-linux-docker.sh b/scripts/build-linux-docker.sh index 07d73ad..b2e6b12 100755 --- a/scripts/build-linux-docker.sh +++ b/scripts/build-linux-docker.sh @@ -70,7 +70,8 @@ find "$BASE_DIR/data/source" "$BASE_DIR/data/cache-linux" \ ! -user 1000 -o ! -group 1000 2>/dev/null | \ xargs -r chown 1000:1000 2>/dev/null || true -notify "WZP Linux x86_64 build started..." +GIT_HASH=$(cd "$BASE_DIR/data/source" && git rev-parse --short HEAD 2>/dev/null || echo "unknown") +notify "WZP Linux x86_64 build started [$GIT_HASH]..." echo ">>> Building in Docker..." docker run --rm --user 1000:1000 \ @@ -114,8 +115,7 @@ docker run --rm \ URL=$(curl -s -F "file=@/tmp/wzp-linux-x86_64.tar.gz" -H "Authorization: $rusty_auth_token" "$rusty_address") if [ -n "$URL" ]; then echo "UPLOAD_URL=$URL" - GIT_HASH=$(cd /build/source && git rev-parse --short HEAD 2>/dev/null || echo unknown) -notify "WZP Linux x86_64 [$GIT_HASH] ready! $URL" + notify "WZP Linux x86_64 [$GIT_HASH] ready! $URL" echo ">>> Done! Binaries at: $URL" else notify "WZP Linux build FAILED - upload error"