Corrected build.sh.

This commit is contained in:
2025-12-10 15:27:57 +01:00
parent 2c1b1ab38c
commit 7c58e29799

View File

@@ -4,10 +4,8 @@ VERSION=$(git describe --tags --always 2>/dev/null)
if [ ! -z "$VERSION" ]; then
echo "Building version: $VERSION"
LDFLAGS="-ldflags \"-X main.Version=$VERSION\""
go build -o test-version -ldflags "-X main.Version=$VERSION"
else
echo "Building without version information"
LDFLAGS=""
go build -o test-version .
fi
go build $LDFLAGS -o test-version .