从VSS自动拉下文件/编译/发布到Linux服务器 一条龙脚本(无人工干预)
2008-09-25 18:39
465 查看
从VSS自动拉下文件/编译/发布到服务器一条龙(无人工干预)
1)build.bat
Call "D:/App/ant162/bin/ant.bat" -buildfile=build_vss_ant.xml
wscript.exe //e:vbscript build.vbs
2)build_vss_ant.xml 核心内容
<target name="getSource" depends="init">
<vssget vsspath="${vss.path}/" localpath="." login="james.wang,123456"
ssdir="${vss.ssdir}" serverPath="${vss.svrdir}"
autoresponse="Y" recursive="true" quiet="false" writable="true" writablefiles="replace"/>
</target>
3)build.vbs 核心内容(模拟键盘输入口令,上传到FTP或者SSH的Linxu的服务器,这里需要把SSH Client安装文件拷贝到当前目录下,因为原先的安装目录可能包含空格,VBS不支持)
Dim WshShell, GamePath
GamePath="./ssh/scp2.exe -r ./webapps root@10.144.177.222:/usr/DMA"
Set WshShell=WScript.CreateObject("WScript.Shell")
WshShell.Run GamePath
WScript.Sleep 2000
WshShell.AppActivate "ttt"
WshShell.SendKeys "hgre@dy"
WScript.Sleep 200
WshShell.SendKeys "{ENTER}"
#这里
------------------------
将build.bat设置成Windows的定时任务就可以每天晚上编译发布了。
对于windows下的操作就更简单了
------------------------------------------------------------------------------------------------------------------------
mkdir aricept
svn checkout http://svn-dgts.lemon-asia.com/svn/Pfizer-AriceptII/src/ --username leslie.sheng --password 123456 aricept
svn update http://svn-dgts.lemon-asia.com/svn/Pfizer-AriceptII/src/ --username leslie.sheng --password 123456 aricept
net use m: /delete
net use m: //10.144.176.139/woodyprj 1234 /USER:administrator
xcopy aricept m:/aricept02 /E /C /I /F /R /Y
net use m: /delete
------------------------------------------------------------------------------------------------------------------------
1)build.bat
Call "D:/App/ant162/bin/ant.bat" -buildfile=build_vss_ant.xml
wscript.exe //e:vbscript build.vbs
2)build_vss_ant.xml 核心内容
<target name="getSource" depends="init">
<vssget vsspath="${vss.path}/" localpath="." login="james.wang,123456"
ssdir="${vss.ssdir}" serverPath="${vss.svrdir}"
autoresponse="Y" recursive="true" quiet="false" writable="true" writablefiles="replace"/>
</target>
3)build.vbs 核心内容(模拟键盘输入口令,上传到FTP或者SSH的Linxu的服务器,这里需要把SSH Client安装文件拷贝到当前目录下,因为原先的安装目录可能包含空格,VBS不支持)
Dim WshShell, GamePath
GamePath="./ssh/scp2.exe -r ./webapps root@10.144.177.222:/usr/DMA"
Set WshShell=WScript.CreateObject("WScript.Shell")
WshShell.Run GamePath
WScript.Sleep 2000
WshShell.AppActivate "ttt"
WshShell.SendKeys "hgre@dy"
WScript.Sleep 200
WshShell.SendKeys "{ENTER}"
#这里
------------------------
将build.bat设置成Windows的定时任务就可以每天晚上编译发布了。
对于windows下的操作就更简单了
------------------------------------------------------------------------------------------------------------------------
mkdir aricept
svn checkout http://svn-dgts.lemon-asia.com/svn/Pfizer-AriceptII/src/ --username leslie.sheng --password 123456 aricept
svn update http://svn-dgts.lemon-asia.com/svn/Pfizer-AriceptII/src/ --username leslie.sheng --password 123456 aricept
net use m: /delete
net use m: //10.144.176.139/woodyprj 1234 /USER:administrator
xcopy aricept m:/aricept02 /E /C /I /F /R /Y
net use m: /delete
------------------------------------------------------------------------------------------------------------------------
相关文章推荐
- 一键自动发布ipa(更新svn,拷贝资源,压缩资源,加密图片资源,加密数据文件,加密lua脚本,编译代码,ipa签名,上传ftp)
- 一键自动发布ipa(更新svn,拷贝资源,压缩资源,加密图片资源,加密数据文件,加密lua脚本,编译代码,ipa签名,上传ftp)
- linux服务器文件自动备份脚本
- 利用ant自动从vss下载代码并编译到自动发布
- 使用Python创建.sd服务定义文件,实现脚本自动发布ArcGIS服务
- ccnet +msbuild +svn 每日构建(二 )编译完成后自动发布并部署文件
- Linux编写Shell脚本自动同步svn并发布maven项目-Linux服务器用户设置
- 使用Python创建.sd服务定义文件,实现脚本自动发布ArcGIS服务
- 自动编译busybox文件系统脚本
- linux shell脚本自动从git上拉取maven代码编译打war包并发布到tomcat
- linux下使用git和gradle编译项目,编写简单的自动发布脚本
- bat文件自动编译InnoSetup脚本
- BlackBerry自动编译、签名、发布Ant脚本
- 自动从vss下载代码并编译的脚本
- Android 项目编译过程【Android脚本自动发布APK提测】
- Silverlight Toolkit编译时,有效的文件,插件化的本地化发布。
- 备份文件自动对比、删除脚本
- linux中使用shell脚本自动登录ftp服务器下载上传文件。
- 使用shell脚本自动部署(发布,重起)maven(java)项目
- Tomcat自动编译MyEclipse、Eclipse编译后的文件节约时间