reversed disabling git metadata

This commit is contained in:
uwer 2023-05-04 09:03:57 +10:00
parent 8be1890b1d
commit bbeccaeed0
1 changed files with 6 additions and 6 deletions

View File

@ -16,12 +16,12 @@ if [ "$(which go)" == "" ]; then
fi
# Hardcode some values to the core package.
#if [ -d ".git" ]; then
# VERSION=$(git describe --tags --abbrev=0)
# GITSHA=$(git rev-parse --short HEAD)
# LDFLAGS="$LDFLAGS -X github.com/tidwall/tile38/core.Version=${VERSION}"
# LDFLAGS="$LDFLAGS -X github.com/tidwall/tile38/core.GitSHA=${GITSHA}"
#fi
if [ -d ".git" ]; then
VERSION=$(git describe --tags --abbrev=0)
GITSHA=$(git rev-parse --short HEAD)
LDFLAGS="$LDFLAGS -X github.com/tidwall/tile38/core.Version=${VERSION}"
LDFLAGS="$LDFLAGS -X github.com/tidwall/tile38/core.GitSHA=${GITSHA}"
fi
LDFLAGS="$LDFLAGS -X github.com/tidwall/tile38/core.BuildTime=$(date +%FT%T%z)"
# Generate the core package