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

推荐订阅源

酷 壳 – CoolShell
酷 壳 – CoolShell
H
Hacker News: Front Page
P
Palo Alto Networks Blog
T
ThreatConnect
Apple Machine Learning Research
Apple Machine Learning Research
博客园_首页
T
True Tiger Recordings
P
Privacy & Cybersecurity Law Blog
B
Blog
IT之家
IT之家
Last Week in AI
Last Week in AI
F
Full Disclosure
Hacker News: Ask HN
Hacker News: Ask HN
C
Comments on: Blog
Microsoft Azure Blog
Microsoft Azure Blog
C
Cybersecurity and Infrastructure Security Agency CISA
Microsoft Security Blog
Microsoft Security Blog
博客园 - 【当耐特】
N
News and Events Feed by Topic
NISL@THU
NISL@THU
腾讯CDC
雷峰网
雷峰网
Security Latest
Security Latest
李成银的技术随笔
M
Microsoft Research Blog - Microsoft Research
L
LangChain Blog
L
Lohrmann on Cybersecurity
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
C
Check Point Blog
Y
Y Combinator Blog
Recent Announcements
Recent Announcements
博客园 - Franky
N
News | PayPal Newsroom
V
V2EX
A
About on SuperTechFans
The Register - Security
The Register - Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Google Online Security Blog
Google Online Security Blog
MyScale Blog
MyScale Blog
Cisco Talos Blog
Cisco Talos Blog
Vercel News
Vercel News
WordPress大学
WordPress大学
C
Cyber Attacks, Cyber Crime and Cyber Security
The Hacker News
The Hacker News
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
爱范儿
爱范儿
A
Arctic Wolf
L
LINUX DO - 最新话题
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

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