Skip to content

Commit

Permalink
chore fix all script, readlink have no -f param in some macos
Browse files Browse the repository at this point in the history
  • Loading branch information
q191201771 committed Jun 12, 2023
1 parent 9d8a9b8 commit 22281a8
Show file tree
Hide file tree
Showing 9 changed files with 80 additions and 2 deletions.
8 changes: 8 additions & 0 deletions script/build_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}/..

Expand Down
14 changes: 13 additions & 1 deletion script/check_versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# 2. HTTP-API和HTTP-Notify
# 3. Web-UI
# 4. Go版本
# 5. TODO 依赖版本,目前只有naza
# 5. 依赖版本,目前只有naza

# 已检查的git commit hash id, 或者tag号
# 本地代码会和该版本对比
Expand Down Expand Up @@ -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}/..

Expand Down Expand Up @@ -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
12 changes: 11 additions & 1 deletion script/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 8 additions & 0 deletions script/gen_release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}/..

Expand Down
8 changes: 8 additions & 0 deletions script/gen_tag.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}/..

Expand Down
8 changes: 8 additions & 0 deletions script/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}/..

Expand Down
8 changes: 8 additions & 0 deletions script/run_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}/..

Expand Down
8 changes: 8 additions & 0 deletions script/showdeps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}/..

Expand Down
8 changes: 8 additions & 0 deletions script/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}/..

Expand Down

0 comments on commit 22281a8

Please sign in to comment.