#!/bin/bash echo "服务开始打包" export JAVA_HOME=~/Library/Java/JavaVirtualMachines/corretto-17.0.11/Contents/Home mvn -P prod clean package -Dmaven.test.skip=true echo "服务打包完成" echo "开始上传jar" scp ./web/target/*.jar jg-node1:/usr/local/ams-social/ echo "上传完成" echo "开始启动服务" ssh jg-node1 "cd /usr/local/ams-social && docker-compose up -d --build " echo "部署完成"