3 Star 1 Fork 0

尹龙海/smarts-api

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
deploy 1.02 KB
一键复制 编辑 原始数据 按行查看 历史
zhanghong 提交于 2023-06-25 14:45 . feat: 去掉重复的path
#!/usr/local/bin/expect -f
#variable
set service_user root
set service_ip 39.105.212.213
set service_pwd XjQLzM4_TW.9F2W
set service_port 22
set scp_source_path target/smarts.jar
set scp_to_path /root/smarts
set service_app_path /root/smarts
set timeout -1
# bash shell
spawn $env(SHELL)
match_max 100000
expect -exact ""
# pack
#send -- "cd $pack_path\r"
#expect -exact "cd $pack_path"
send -- "mvn clean && mvn package --settings /Users/zhanghong/opt/apache-maven-3.6.3/conf/settings.xml\r"
expect -exact "mvn package --settings /Users/zhanghong/opt/apache-maven-3.6.3/conf/settings.xml"
# scp
send -- "scp -P$service_port $scp_source_path $service_user@$service_ip:$scp_to_path\r"
expect -exact "$service_user@$service_ip's password: "
send -- "$service_pwd\r"
expect -exact ""
# restart app
send -- "ssh -p $service_port $service_user@$service_ip\r"
expect -exact "$service_user@$service_ip's password: "
send -- "$service_pwd\r"
expect -exact ""
send -- "cd $service_app_path\r"
expect -exact ""
send "sh start.sh\r"
# done
interact
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yin-longhai/smarts-api.git
git@gitee.com:yin-longhai/smarts-api.git
yin-longhai
smarts-api
smarts-api
master

搜索帮助