diff --git a/script/build_docker_image.sh b/script/build_docker_image.sh index 91d9a66..f2da257 100755 --- a/script/build_docker_image.sh +++ b/script/build_docker_image.sh @@ -6,6 +6,14 @@ go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct export GO111MODULE=on export GOPROXY=https://goproxy.cn,https://goproxy.io,direct THIS_FILE=$(readlink -f $0) +# readlink have no -f param in some macos +if [ $? -ne 0 ]; then + cd `dirname $0` + TARGET_FILE=`basename $0` + PHYS_DIR=`pwd -P` + THIS_FILE=$PHYS_DIR/$TARGET_FILE + cd - +fi THIS_DIR=$(dirname $THIS_FILE) ROOT_DIR=${THIS_DIR}/.. diff --git a/script/check_versions.sh b/script/check_versions.sh index ef13da7..0d29c37 100755 --- a/script/check_versions.sh +++ b/script/check_versions.sh @@ -9,7 +9,7 @@ # 2. HTTP-API和HTTP-Notify # 3. Web-UI # 4. Go版本 -# 5. TODO 依赖版本,目前只有naza +# 5. 依赖版本,目前只有naza # 已检查的git commit hash id, 或者tag号 # 本地代码会和该版本对比 @@ -42,6 +42,14 @@ go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct export GO111MODULE=on export GOPROXY=https://goproxy.cn,https://goproxy.io,direct THIS_FILE=$(readlink -f $0) +# readlink have no -f param in some macos +if [ $? -ne 0 ]; then + cd `dirname $0` + TARGET_FILE=`basename $0` + PHYS_DIR=`pwd -P` + THIS_FILE=$PHYS_DIR/$TARGET_FILE + cd - +fi THIS_DIR=$(dirname $THIS_FILE) ROOT_DIR=${THIS_DIR}/.. @@ -82,3 +90,7 @@ echo '----------doc go version----------' cat ${ROOT_DIR}/go.mod | grep 'go' | grep -v 'module' | grep -v 'require' cat ${ROOT_DIR}/README.md | grep 'make sure that Go version' cat ${ROOT_DIR}/../lalext/lal_website/ThirdDeps.md | grep 'Go版本需要' + +echo '----------dep naza----------' +cat ${ROOT_DIR}/go.mod | grep 'naza' +head -n 1 ${ROOT_DIR}/../naza/CHANGELOG.md diff --git a/script/clean.sh b/script/clean.sh index c8f7dca..7db74fe 100755 --- a/script/clean.sh +++ b/script/clean.sh @@ -6,10 +6,20 @@ go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct export GO111MODULE=on export GOPROXY=https://goproxy.cn,https://goproxy.io,direct THIS_FILE=$(readlink -f $0) +# readlink have no -f param in some macos +if [ $? -ne 0 ]; then + cd `dirname $0` + TARGET_FILE=`basename $0` + PHYS_DIR=`pwd -P` + THIS_FILE=$PHYS_DIR/$TARGET_FILE + cd - +fi THIS_DIR=$(dirname $THIS_FILE) ROOT_DIR=${THIS_DIR}/.. cd ${ROOT_DIR} -rm -rf ./release ./bin ./lal_record ./logs coverage.txt +rm -rf coverage.txt +rm -rf *.laldump *.log +rm -rf ./release ./bin ./lal_record ./logs find ./pkg -name 'lal_record' | xargs rm -rf find ./pkg -name 'logs' | xargs rm -rf diff --git a/script/gen_release.sh b/script/gen_release.sh index b22635a..9f22d60 100755 --- a/script/gen_release.sh +++ b/script/gen_release.sh @@ -23,6 +23,14 @@ go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct export GO111MODULE=on export GOPROXY=https://goproxy.cn,https://goproxy.io,direct THIS_FILE=$(readlink -f $0) +# readlink have no -f param in some macos +if [ $? -ne 0 ]; then + cd `dirname $0` + TARGET_FILE=`basename $0` + PHYS_DIR=`pwd -P` + THIS_FILE=$PHYS_DIR/$TARGET_FILE + cd - +fi THIS_DIR=$(dirname $THIS_FILE) ROOT_DIR=${THIS_DIR}/.. diff --git a/script/gen_tag.sh b/script/gen_tag.sh index 2493bd7..0c48144 100755 --- a/script/gen_tag.sh +++ b/script/gen_tag.sh @@ -16,6 +16,14 @@ go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct export GO111MODULE=on export GOPROXY=https://goproxy.cn,https://goproxy.io,direct THIS_FILE=$(readlink -f $0) +# readlink have no -f param in some macos +if [ $? -ne 0 ]; then + cd `dirname $0` + TARGET_FILE=`basename $0` + PHYS_DIR=`pwd -P` + THIS_FILE=$PHYS_DIR/$TARGET_FILE + cd - +fi THIS_DIR=$(dirname $THIS_FILE) ROOT_DIR=${THIS_DIR}/.. diff --git a/script/run.sh b/script/run.sh index 749af7d..04df1a1 100755 --- a/script/run.sh +++ b/script/run.sh @@ -6,6 +6,14 @@ go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct export GO111MODULE=on export GOPROXY=https://goproxy.cn,https://goproxy.io,direct THIS_FILE=$(readlink -f $0) +# readlink have no -f param in some macos +if [ $? -ne 0 ]; then + cd `dirname $0` + TARGET_FILE=`basename $0` + PHYS_DIR=`pwd -P` + THIS_FILE=$PHYS_DIR/$TARGET_FILE + cd - +fi THIS_DIR=$(dirname $THIS_FILE) ROOT_DIR=${THIS_DIR}/.. diff --git a/script/run_docker.sh b/script/run_docker.sh index 0fba5a4..d1f07d8 100755 --- a/script/run_docker.sh +++ b/script/run_docker.sh @@ -6,6 +6,14 @@ go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct export GO111MODULE=on export GOPROXY=https://goproxy.cn,https://goproxy.io,direct THIS_FILE=$(readlink -f $0) +# readlink have no -f param in some macos +if [ $? -ne 0 ]; then + cd `dirname $0` + TARGET_FILE=`basename $0` + PHYS_DIR=`pwd -P` + THIS_FILE=$PHYS_DIR/$TARGET_FILE + cd - +fi THIS_DIR=$(dirname $THIS_FILE) ROOT_DIR=${THIS_DIR}/.. diff --git a/script/showdeps.sh b/script/showdeps.sh index c57d081..0b5a71c 100755 --- a/script/showdeps.sh +++ b/script/showdeps.sh @@ -12,6 +12,14 @@ go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct export GO111MODULE=on export GOPROXY=https://goproxy.cn,https://goproxy.io,direct THIS_FILE=$(readlink -f $0) +# readlink have no -f param in some macos +if [ $? -ne 0 ]; then + cd `dirname $0` + TARGET_FILE=`basename $0` + PHYS_DIR=`pwd -P` + THIS_FILE=$PHYS_DIR/$TARGET_FILE + cd - +fi THIS_DIR=$(dirname $THIS_FILE) ROOT_DIR=${THIS_DIR}/.. diff --git a/script/test.sh b/script/test.sh index dab1dc5..d647afe 100755 --- a/script/test.sh +++ b/script/test.sh @@ -6,6 +6,14 @@ go env -w GOPROXY=https://goproxy.cn,https://goproxy.io,direct export GO111MODULE=on export GOPROXY=https://goproxy.cn,https://goproxy.io,direct THIS_FILE=$(readlink -f $0) +# readlink have no -f param in some macos +if [ $? -ne 0 ]; then + cd `dirname $0` + TARGET_FILE=`basename $0` + PHYS_DIR=`pwd -P` + THIS_FILE=$PHYS_DIR/$TARGET_FILE + cd - +fi THIS_DIR=$(dirname $THIS_FILE) ROOT_DIR=${THIS_DIR}/..