This commit is contained in:
TonyChyi 2018-03-20 13:29:19 +08:00
parent b346859be0
commit f9f1d77182

View File

@ -2,6 +2,11 @@
export BUILD_BASE=build export BUILD_BASE=build
function get_go_ver(){
GOVER=`go version|awk '{print $3}'`
export GOVER
}
function get_os() { function get_os() {
OS=`uname|tr '[:upper:]' '[:lower:]'` OS=`uname|tr '[:upper:]' '[:lower:]'`
if [ "${GOOS}x" != "x" ]; then if [ "${GOOS}x" != "x" ]; then
@ -27,7 +32,11 @@ function main() {
rm -rf build rm -rf build
mkdir -p $BUILD_BASE mkdir -p $BUILD_BASE
get_os get_os
case OS get_go_ver
if [ $GOVER == 'go1.10' ]; then
export CGO_LDFLAGS_ALLOW=".*"
fi
case $OS
darwin) darwin)
build_darwin build_darwin
;; ;;