惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tailwind CSS Blog
C
CERT Recently Published Vulnerability Notes
P
Proofpoint News Feed
Vercel News
Vercel News
博客园 - 三生石上(FineUI控件)
IT之家
IT之家
Help Net Security
Help Net Security
月光博客
月光博客
N
News and Events Feed by Topic
Cloudbric
Cloudbric
博客园 - 司徒正美
L
LangChain Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tenable Blog
The Register - Security
The Register - Security
The Hacker News
The Hacker News
I
InfoQ
The Last Watchdog
The Last Watchdog
MyScale Blog
MyScale Blog
Schneier on Security
Schneier on Security
WordPress大学
WordPress大学
小众软件
小众软件
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
宝玉的分享
宝玉的分享
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
K
Kaspersky official blog
L
LINUX DO - 热门话题
N
News | PayPal Newsroom
F
Fortinet All Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
S
Security @ Cisco Blogs
Recorded Future
Recorded Future
大猫的无限游戏
大猫的无限游戏
H
Help Net Security
Google Online Security Blog
Google Online Security Blog
S
Schneier on Security
C
Cisco Blogs
N
News and Events Feed by Topic
V2EX - 技术
V2EX - 技术
Latest news
Latest news
PCI Perspectives
PCI Perspectives
T
The Blog of Author Tim Ferriss
P
Palo Alto Networks Blog
T
Tor Project blog
Project Zero
Project Zero
云风的 BLOG
云风的 BLOG
Webroot Blog
Webroot Blog
Attack and Defense Labs
Attack and Defense Labs
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org

博客园 - chengbo

Android Studio:为Android定制的IDE 使用Gitolite来对Git的repository实现权限控制 用Debian当路由,来解决BT造成的网络慢的问题 更快的,更好的支持硬件的模拟器 当LISTVIEW有HEADER时,ONITEMCLICK里的POSITION不正确 准备再写写东西了 压缩 ViewState 后,与 UpdatePanel 的兼容问题 - chengbo 如何让 firefox 的窗口大小不再被网页脚本改变 52个行之有效的减压方法 用Javascript检查Caps Lock是否按下 如何用C#和SQL获得当前月的第一天和最后一天 maxthon 2 预览版的邀请 成都古羌科技有限公司招聘 怎样用TSQL建JOB xml参数存储过程 如何在ReadOnly的DataGrid中的让CheckBox列可点击 激情黄健翔 Head first design patterns 读书笔记 – Strategy(策略模式) 双击U盘出现“拒绝访问”的解决方法
每天如何自动编译项目并将之打包添加到VSS中 - chengbo - 博客园
chengbo · 2006-11-29 · via 博客园 - chengbo

项目组需要每天编译一次项目,然后把编译好的程序集打包,添加到SourceSafe以日期命名的Project中。
有一个批处理的脚本可以自动完成这些操作,其中会用到SourceSafe提供的一些命令。
更多命令请查看MSDN

ECHO OFF
d:
cd\
cd D:\PublishCode\Publish\SourceCode

:: 设置vss的环境变量
path "C:\Program Files\Microsoft Visual Studio\VSS\win32"

:: 设置VSS数据库路径
set ssdir=C:\Program Files\Microsoft Visual Studio\VSS

:: 获取最新代码
ss get "$/Source" -Yusername,password -R -i-n
@ECHO ON
@ECHO OFF

:: 设置vs的环境变量
set oldpath=%path%
set path="C:\Program Files\Microsoft Visual Studio .NET 2003\Common7\Tools";%path%
call vsvars32.bat
@echo on
devenv /rebuild Release "D:\PublishCode\Publish\SourceCode\WindowsApplication2.sln"
set path=%oldpath%     

@ECHO ON
d:
cd\
cd D:\DailyBuilder\
path C:\Program Files\WinRAR\

:: 去除只读属性
C:\windows\system32\attrib -r D:\DailyBuilder\Publish.rar

:: 打包编译好的程序
rar a Publish.rar "D:\POPublishCode\NeweggPOPublish\SourceCode\WindowsApplication2\bin\Release" "D:\POPublishCode\NeweggPOPublish\SourceCode\RemotingServer\bin\Release"

path "C:\Program Files\Microsoft Visual Studio\VSS\win32"
set ssdir=C:\Program Files\Microsoft Visual Studio\VSS
:: 设置当前Project为$/DailyBuild
ss Cp "$/DailyBuild"  -Yusername,password
:: 删除Project,如(2006-11-29)
ss Delete %date:~6,4%-%date:~0,2%-%date:~3,2%-Release -i-y -Yusername,password
:: 新建Project,如(2006-11-29)
ss Create %date:~6,4%-%date:~0,2%-%date:~3,2%-Release -C\ -Yusername,password
:: 设置当前Project为$/DailyBuild/2006-11-29
ss Cp $/DailyBuild/%date:~6,4%-%date:~0,2%-%date:~3,2%-Release -Yusername,password
:: 添加Publish.rar到VSS中
ss Add Publish.rar -C\ -Yusername,password -I-

pause

注:%date%的值在不同的系统、语言版本下可能是不一样的,控制面板里面区域选项的设定也会改变%date%的值。所以请先在命令行中查看一下echo %date%的运行结果。