Use the first GOPATH to build

Signed-off-by: Jingwen Peng <pengsrc@yunify.com>
This commit is contained in:
Jingwen Peng 2016-12-14 16:30:08 +08:00
parent 79a9d7f5be
commit 9818466f5d
No known key found for this signature in database
GPG Key ID: D13E028376D8D9B1
1 changed files with 2 additions and 1 deletions

View File

@ -193,7 +193,8 @@ release-binary-go-1.7:
done
cross=(linux_amd64 darwin_amd64 windows_amd64); \
for os_arch in $${cross[@]}; do \
pushd "${GOPATH}/pkg/$${os_arch}/github.com/yunify/qingcloud-sdk-go"; \
MAIN_GOPATH=$$(echo "${GOPATH}" | awk '{split($$1,p,":"); print(p[1])}'); \
pushd "$${MAIN_GOPATH}/pkg/$${os_arch}/github.com/yunify/qingcloud-sdk-go"; \
zip -r "/tmp/${PREFIX}-binary-v${VERSION}-$${os_arch}-go-1.7.zip" .; \
popd; \
cp "/tmp/${PREFIX}-binary-v${VERSION}-$${os_arch}-go-1.7.zip" "release/"; \