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