Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit 5906489

Browse files
committed
bin: fixed variable injection for the version subcommand.
1 parent 1ff81cc commit 5906489

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

bin/build-all.bash

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ if [[ "$(pwd)" != "${REPO_ROOT}" ]]; then
3030
exit 1
3131
fi
3232

33-
GO_BUILD_CMD="go build -a -installsuffix cgo"
33+
GO_BUILD_CMD='go build -a -installsuffix cgo'
3434
GO_BUILD_LDFLAGS="-s -w \
35-
-X internal.version.commitHash=${COMMIT_HASH} \
36-
-X internal.version.buildDate=${DATE} \
37-
-X internal.version.version=${VERSION}"
35+
-X github.com/CoinMintTech/go-bittrex-cli/internal/version.buildDate='${DATE}' \
36+
-X github.com/CoinMintTech/go-bittrex-cli/internal/version.commitHash='${COMMIT_HASH}' \
37+
-X github.com/CoinMintTech/go-bittrex-cli/internal/version.version='${VERSION}'"
3838

3939
if [[ -z "${DEP_BUILD_PLATFORMS}" ]]; then
4040
DEP_BUILD_PLATFORMS="linux windows darwin freebsd"
@@ -53,8 +53,12 @@ for OS in ${DEP_BUILD_PLATFORMS[@]}; do
5353
NAME="${NAME}.exe"
5454
fi
5555
echo "building for ${OS}/${ARCH}"
56-
GOARCH=${ARCH} GOOS=${OS} CGO_ENABLED=0 ${GO_BUILD_CMD} -ldflags "${GO_BUILD_LDFLAGS}"\
57-
-o "${REPO_ROOT}/release/${NAME}" .
58-
shasum -a 256 "${REPO_ROOT}/release/${NAME}" > "${REPO_ROOT}/release/${NAME}".sha256
56+
GOARCH=${ARCH} GOOS=${OS} CGO_ENABLED=0 ${GO_BUILD_CMD} \
57+
-ldflags "${GO_BUILD_LDFLAGS}" \
58+
-o "${REPO_ROOT}/release/${NAME}" .
59+
shasum \
60+
-a 256 \
61+
"${REPO_ROOT}/release/${NAME}" \
62+
> "${REPO_ROOT}/release/${NAME}".sha256
5963
done
60-
done
64+
done

0 commit comments

Comments
 (0)