update
This commit is contained in:
parent
852c55b516
commit
14d4970e82
@ -77,12 +77,12 @@ function main(){
|
|||||||
echo "result $result"
|
echo "result $result"
|
||||||
if [ $result = 0 ];then
|
if [ $result = 0 ];then
|
||||||
# uploadLog
|
# uploadLog
|
||||||
echo "local temp file is same with oss file,no need to replace"
|
echo "local temp file ${fileName} is same with file in ${projectPath} ,no need to replace"
|
||||||
echo "ok: checkService done"
|
echo "ok: checkService done"
|
||||||
echo " "
|
echo " "
|
||||||
exit 0
|
exit 0
|
||||||
elif [ $result = 1 ]; then
|
elif [ $result = 1 ]; then
|
||||||
echo "local temp file $fileName is different from oss, will download..."
|
echo "local temp file $fileName is different from ${projectPath}, will replace..."
|
||||||
else
|
else
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
@ -6,6 +6,8 @@ projectPath=$2
|
|||||||
PATH=PATH:/usr/bin:/usr/sbin
|
PATH=PATH:/usr/bin:/usr/sbin
|
||||||
echo "1"
|
echo "1"
|
||||||
projectName="${fileName%.*}"
|
projectName="${fileName%.*}"
|
||||||
|
|
||||||
|
|
||||||
cd ~
|
cd ~
|
||||||
echo "current path: $(pwd)"
|
echo "current path: $(pwd)"
|
||||||
if [ ! -f "$fileName" ];then
|
if [ ! -f "$fileName" ];then
|
||||||
|
@ -37,9 +37,6 @@ function compare(){
|
|||||||
fi
|
fi
|
||||||
echo "ossLength ${fileName} : "$ossLength
|
echo "ossLength ${fileName} : "$ossLength
|
||||||
echo "curLength ${fileName} : "$curLength
|
echo "curLength ${fileName} : "$curLength
|
||||||
logPath=${ossPath%/*}
|
|
||||||
logPath=${logPath%/*}/logs/
|
|
||||||
osslogPath=oss://ztupload/${logPath}autoDeploy.log
|
|
||||||
if [ "${ossLength}" = "${curLength}" ];then
|
if [ "${ossLength}" = "${curLength}" ];then
|
||||||
return 0
|
return 0
|
||||||
else
|
else
|
||||||
@ -55,6 +52,9 @@ function process(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
# function uploadLog(){
|
# function uploadLog(){
|
||||||
|
# logPath=${ossPath%/*}
|
||||||
|
# logPath=${logPath%/*}/logs/
|
||||||
|
# osslogPath=oss://ztupload/${logPath}autoDeploy.log
|
||||||
# journalctl -n 1000 -xe -t autoDeploy > ~/autoDeploy.log
|
# journalctl -n 1000 -xe -t autoDeploy > ~/autoDeploy.log
|
||||||
# if [ $? = 0 ];then
|
# if [ $? = 0 ];then
|
||||||
# echo "uploaded log to ${osslogPath}"
|
# echo "uploaded log to ${osslogPath}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user