How to submit updates using command lines in TFs

Source: Internet
Author: User

First, we create a universal BAT for getting, checking out, copying, and checking out a file.

Postbuild. bat

Rem % 1 - Source directory % 2 - Target directory % 3 - File Name
Rem writes D: \ projects \ _ commonlibrary \ postbuild. Bat $ (targetdir) D: \ projects \ _ commonlibrary \ XXX $ (targetfilename) in the generated event)
If Defined tfpath Goto Runtf
If Defined ProgramFiles Set Tfpath = % ProgramFiles % \ Microsoft Visual Studio 9.0 \ Common7 \ ide
If Defined ProgramFiles (x86) Set Tfpath = % ProgramFiles (x86) % \ Microsoft Visual Studio 9.0 \ Common7 \ ide
: Runtf
@ Echo ' Update started '
" % Tfpath % \ tf.exe "   Get   % 2 \ % 3
" % Tfpath % \ tf.exe " Checkout % 2 \ % 3
Copy % 1 \ % 3   % 2 \ % 3
" % Tfpath % \ tf.exe " Checkin % 2 \ % 3   / Override : Reason.txt / Noprompt
Set Tfpath =
@ Echo ' Complete '

This bat file can be used in post-project events, so that the generated dll can be automatically checked into TFs each compilation; you can also write an external BAT file to use this function.

For example, there is another copy. Bat task:

Net use \\ 192.168 . 1.5   / User: user name and password

call D: \ postbuild. bat D: \ XXX \ bin \ release D: \ YYY \ ABC. DLL

call D: \ postbuild. bat D: \ XXX \ bin \ release D: \ YYY \ ABC. PDB

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.