1
This commit is contained in:
parent
7bbe6d1839
commit
de0cdc28b4
31
scripts/publish_golang/boundle.sh
Normal file
31
scripts/publish_golang/boundle.sh
Normal file
@ -0,0 +1,31 @@
|
||||
source ./common.sh
|
||||
|
||||
work_dir=`pwd`
|
||||
dir_name=`basename $PWD`
|
||||
|
||||
if [ -f "custom_init.sh" ]; then
|
||||
source ./custom_init.sh
|
||||
fi
|
||||
|
||||
reg='\.*D[1-9]$'
|
||||
if [[ $dir_name =~ $reg ]]
|
||||
then
|
||||
touch bin/is_test_env
|
||||
cd ${SOURCE_DIR}
|
||||
git pull
|
||||
git checkout release
|
||||
cd $work_dir
|
||||
fi
|
||||
|
||||
cd ${SOURCE_PATH}
|
||||
echo ${PRE_COMPILE_CMD}|sh
|
||||
echo ${COMPILE_CMD}|sh
|
||||
pwd
|
||||
echo ${POST_COMPILE_CMD}|sh
|
||||
pwd
|
||||
cd $work_dir
|
||||
|
||||
tag_name=`git status |grep '# On branch '|sed 's/# On branch //g'`
|
||||
package_name=${dir_name}.tar.gz
|
||||
|
||||
tar --exclude=*.git -chzf target/${package_name} bin common.sh reload.sh restart.sh start_instance.sh config ${EXT_PKG_FILES}
|
3
scripts/publish_golang/reload.sh
Executable file
3
scripts/publish_golang/reload.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo 'success'
|
17
scripts/publish_golang/restart.sh
Executable file
17
scripts/publish_golang/restart.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
|
||||
source ./common.sh
|
||||
|
||||
pid=$(ps -ef|grep "${EXE_NAME} -n $2 -i $1"|grep -v grep|awk '{print $2}')
|
||||
echo $pid
|
||||
|
||||
if [[ $pid != "" ]]
|
||||
then
|
||||
echo $pid|xargs kill -9
|
||||
else
|
||||
echo "pid 为空"
|
||||
fi
|
||||
|
||||
nohup ./${EXE_NAME} -n $2 -i $1 >> ${EXE_NAME}$2_$1.out &
|
||||
|
||||
echo 'success'
|
Loading…
x
Reference in New Issue
Block a user