mirror of
https://github.com/minio/minio.git
synced 2024-12-25 06:35:56 -05:00
Do not check for GOPATH env for builds (#5628)
Since go1.8 GOPATH is not required to set prior, as it defaults to "${HOME}/go" we only need to check if go tool detected GOPATH correctly. If yes then we proceed if not we fail.
This commit is contained in:
parent
c726145baf
commit
565dc8b283
@ -128,12 +128,6 @@ assert_check_golang_env() {
|
|||||||
echo "Go runtime version '${installed_go_version}' is unsupported. Minimum supported version: ${GO_VERSION} to compile."
|
echo "Go runtime version '${installed_go_version}' is unsupported. Minimum supported version: ${GO_VERSION} to compile."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "${GOPATH}" ]; then
|
|
||||||
echo "GOPATH environment variable missing, please refer to Go installation document at https://docs.minio.io/docs/how-to-install-golang"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
assert_check_deps() {
|
assert_check_deps() {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
#
|
#
|
||||||
# Minio Cloud Storage, (C) 2015, 2016 Minio, Inc.
|
# Minio Cloud Storage, (C) 2015-2018 Minio, Inc.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
@ -16,7 +16,8 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
IFS=':' read -r -a paths <<< "$GOPATH"
|
gopath=$(go env GOPATH)
|
||||||
|
IFS=':' read -r -a paths <<< "$gopath"
|
||||||
for path in "${paths[@]}"; do
|
for path in "${paths[@]}"; do
|
||||||
minio_path="$path/src/github.com/minio/minio"
|
minio_path="$path/src/github.com/minio/minio"
|
||||||
if [ -d "$minio_path" ]; then
|
if [ -d "$minio_path" ]; then
|
||||||
@ -27,7 +28,7 @@ main() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
echo "ERROR"
|
echo "ERROR"
|
||||||
echo "Project not found in ${GOPATH}."
|
echo "Project not found in ${gopath}."
|
||||||
echo "Follow instructions at https://github.com/minio/minio/blob/master/CONTRIBUTING.md#setup-your-minio-github-repository"
|
echo "Follow instructions at https://github.com/minio/minio/blob/master/CONTRIBUTING.md#setup-your-minio-github-repository"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user