码迷,mamicode.com
首页 > 其他好文 > 详细

bat写的自动部署脚本

时间:2015-06-14 18:29:13      阅读:123      评论:0      收藏:0      [点我收藏+]

标签:

windows7的机器上重启服务需要关闭UAC

::编译部署项目
echo off
echo 1. GatewayAdaptor
echo 2. LogicService
echo 3. MessagePushAdapter
echo 4. PhoneAdaptor
echo 5. StatusService

set /p key=

set projectName=projectName
set deployName=deployName
if %key% == 1 set projectName=GatewayAdaptor
if %key% == 1 set deployName=GatewayAdaptor
if %key% == 2 set projectName=LogicService
if %key% == 2 set deployName=LogicService
if %key% == 3 set projectName=MessagePushAdapter
if %key% == 3 set deployName=MessagePushAdaptor
if %key% == 4 set projectName=PhoneAdaptor
if %key% == 4 set deployName=SmartPhoneAdaptor
if %key% == 5 set projectName=StatusService
if %key% == 5 set deployName=DeviceStatusRegister
if %projectName% == projectName exit

echo on
set projectDir=D:\SourceCode\Platform\trunk\%projectName%
set targetDir=%projectDir%\target
set deployDir=D:\Tomcat\%deployName%\webapps

sc stop %deployName%
cd /d %projectDir%
svn update
cmd /c grails clean-all
cmd /c grails dev war %deployDir%\%projectName%.war

:: restart service
sc start %deployName%

cd D:\SourceCode
pause

 

bat写的自动部署脚本

标签:

原文地址:http://www.cnblogs.com/code-style/p/4575336.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!