Split GOPATH properly on Windows builds
This commit is contained in:
parent
240f045480
commit
8d2b029074
|
@ -21,6 +21,11 @@ if [ "$(go env GOOS)" = "windows" ]; then
|
||||||
EXTENSION=".exe"
|
EXTENSION=".exe"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
GOPATHSINGLE=${GOPATH%%:*}
|
||||||
|
if [ "$(go env GOOS)" = "windows" ]; then
|
||||||
|
GOPATHSINGLE=${GOPATH%%;*}
|
||||||
|
fi
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
echo "--> Installing dependencies to speed up builds..."
|
echo "--> Installing dependencies to speed up builds..."
|
||||||
go get ./...
|
go get ./...
|
||||||
|
@ -31,4 +36,4 @@ go build \
|
||||||
-ldflags "-X main.GitCommit ${GIT_COMMIT}${GIT_DIRTY}" \
|
-ldflags "-X main.GitCommit ${GIT_COMMIT}${GIT_DIRTY}" \
|
||||||
-v \
|
-v \
|
||||||
-o bin/consul${EXTENSION}
|
-o bin/consul${EXTENSION}
|
||||||
cp bin/consul${EXTENSION} ${GOPATH%%:*}/bin
|
cp bin/consul${EXTENSION} ${GOPATHSINGLE}/bin
|
||||||
|
|
Loading…
Reference in New Issue