我在弄自动化代码部署。现在有点不明白。当用脚本去git pull origin master 后,有可能失败,有可能成功。那么有没有办法知道成功和失败的状态。 谢谢!
光阴似箭催人老,日月如移越少年。
It can usually be seen. If there is an error, it will usually be fatal, and you will be prompted as to why the error occurred: there may be a conflict, etc.
if [ $? == 0 ];then echo "success" else echo "fail" fi
Try the above code
It can usually be seen. If there is an error, it will usually be fatal, and you will be prompted as to why the error occurred: there may be a conflict, etc.
Try the above code