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

推荐订阅源

P
Proofpoint News Feed
V2EX - 技术
V2EX - 技术
S
Secure Thoughts
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
L
LINUX DO - 最新话题
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News: Ask HN
Hacker News: Ask HN
T
Troy Hunt's Blog
Forbes - Security
Forbes - Security
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Proofpoint News Feed
Know Your Adversary
Know Your Adversary
Schneier on Security
Schneier on Security
H
Heimdal Security Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Simon Willison's Weblog
Simon Willison's Weblog
V
Vulnerabilities – Threatpost
月光博客
月光博客
罗磊的独立博客
Webroot Blog
Webroot Blog
博客园 - 【当耐特】
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
The Cloudflare Blog
爱范儿
爱范儿
Last Week in AI
Last Week in AI
博客园 - 聂微东
博客园 - 叶小钗
美团技术团队
A
Arctic Wolf
P
Palo Alto Networks Blog
T
Tailwind CSS Blog
Cyberwarzone
Cyberwarzone
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
人人都是产品经理
人人都是产品经理
宝玉的分享
宝玉的分享
H
Hacker News: Front Page
大猫的无限游戏
大猫的无限游戏
S
SegmentFault 最新的问题
Jina AI
Jina AI
C
Cyber Attacks, Cyber Crime and Cyber Security
The Last Watchdog
The Last Watchdog
IT之家
IT之家
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
酷 壳 – CoolShell
酷 壳 – CoolShell
阮一峰的网络日志
阮一峰的网络日志
J
Java Code Geeks
B
Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
P
Privacy & Cybersecurity Law Blog

博客园 - 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%的运行结果。