Corrected build.sh.
This commit is contained in:
6
build.sh
6
build.sh
@@ -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 .
|
||||
|
||||
Reference in New Issue
Block a user