mirror of
https://github.com/status-im/consul.git
synced 2025-01-26 13:40:20 +00:00
Split GOPATH properly on Windows builds
This commit is contained in:
parent
c260f97d0c
commit
d8b3fedee8
@ -21,6 +21,11 @@ if [ "$(go env GOOS)" = "windows" ]; then
|
||||
EXTENSION=".exe"
|
||||
fi
|
||||
|
||||
GOPATHSINGLE=${GOPATH%%:*}
|
||||
if [ "$(go env GOOS)" = "windows" ]; then
|
||||
GOPATHSINGLE=${GOPATH%%;*}
|
||||
fi
|
||||
|
||||
# Install dependencies
|
||||
echo "--> Installing dependencies to speed up builds..."
|
||||
go get ./...
|
||||
@ -31,4 +36,4 @@ go build \
|
||||
-ldflags "-X main.GitCommit ${GIT_COMMIT}${GIT_DIRTY}" \
|
||||
-v \
|
||||
-o bin/consul${EXTENSION}
|
||||
cp bin/consul${EXTENSION} ${GOPATH%%:*}/bin
|
||||
cp bin/consul${EXTENSION} ${GOPATHSINGLE}/bin
|
||||
|
Loading…
x
Reference in New Issue
Block a user