40 lines
2.2 KiB
Batchfile
40 lines
2.2 KiB
Batchfile
|
@echo off
|
|||
|
|
|||
|
::<3A><><EFBFBD><EFBFBD>pei<65>㿴ѩ<E3BFB4><D1A9><EFBFBD><EFBFBD>·<EFBFBD><C2B7>
|
|||
|
set codepath=D:\phy\1.pnkx\pnkx
|
|||
|
|
|||
|
::<3A><><EFBFBD>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD>ip<69><70><EFBFBD>˺š<CBBA><C5A1><EFBFBD><EFBFBD><EFBFBD>
|
|||
|
set serverip=120.53.247.15
|
|||
|
set serveruser=root
|
|||
|
set userpwd=phy0316.
|
|||
|
|
|||
|
::<3A><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>·<EFBFBD><C2B7><EFBFBD><EFBFBD>linux<75>ű<EFBFBD>·<EFBFBD><C2B7>
|
|||
|
set uploadpath=/app/
|
|||
|
|
|||
|
D:
|
|||
|
cd "%codepath%"
|
|||
|
|
|||
|
echo maven clean start...
|
|||
|
"C:\Program Files\Java\jdk1.8.0_111\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\phy\1.pnkx\pnkx -Djansi.passthrough=true -Dmaven.home=D:\office\maven\apache-maven-3.5.3 -Dclassworlds.conf=D:\office\maven\apache-maven-3.5.3\bin\m2.conf "-Dmaven.ext.class.path=D:\office\IntelliJ IDEA 2023.2\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\office\IntelliJ IDEA 2023.2\lib\idea_rt.jar=59230:D:\office\IntelliJ IDEA 2023.2\bin" -Dfile.encoding=UTF-8 -classpath D:\office\maven\apache-maven-3.5.3\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2023.2 -s D:\office\maven\apache-maven-3.5.3\conf\settings.xml -Dmaven.repo.local=D:\office\maven\repository clean
|
|||
|
|
|||
|
echo maven package start...
|
|||
|
"C:\Program Files\Java\jdk1.8.0_111\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\phy\1.pnkx\pnkx -Djansi.passthrough=true -Dmaven.home=D:\office\maven\apache-maven-3.5.3 -Dclassworlds.conf=D:\office\maven\apache-maven-3.5.3\bin\m2.conf "-Dmaven.ext.class.path=D:\office\IntelliJ IDEA 2023.2\plugins\maven\lib\maven-event-listener.jar" "-javaagent:D:\office\IntelliJ IDEA 2023.2\lib\idea_rt.jar=59244:D:\office\IntelliJ IDEA 2023.2\bin" -Dfile.encoding=UTF-8 -classpath D:\office\maven\apache-maven-3.5.3\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2023.2 -s D:\office\maven\apache-maven-3.5.3\conf\settings.xml -Dmaven.repo.local=D:\office\maven\repository package
|
|||
|
echo maven package finished!
|
|||
|
|
|||
|
|
|||
|
echo upload start...
|
|||
|
pscp -l %serveruser% -pw "%userpwd%" "%codepath%\pnkx-admin\target\pnkx-admin.jar" %serveruser%@%serverip%:%uploadpath%
|
|||
|
echo upload finished!
|
|||
|
|
|||
|
|
|||
|
echo update start...
|
|||
|
set sshFile=%codepath%\TempSSH.txt
|
|||
|
>"%sshFile%" (
|
|||
|
echo,cd %uploadpath%
|
|||
|
echo,sh start.sh restart
|
|||
|
)
|
|||
|
echo %serverip% update start...
|
|||
|
plink -ssh %serveruser%@%serverip% -pw %userpwd% -m %sshFile% -no-antispoof
|
|||
|
echo update finished!
|
|||
|
pause
|