Daily Build Practice

xiaoxiao2021-03-06  51

Daily Build Practice

Daily Build as one of the best practices developed by software, Microsoft even referred to as project management heartbeat, which shows its important role in software development. Why is there such a high evaluation? In addition to some significant improvements that are usually mentioned, it is mainly because there are some prerequisites before DAILY Build, which means that you have implemented at least SCM management:

1. Source management

2. Unit test

3. Version management

4. BUG management

DAILY Build on the above-mentioned basis can be said to be a habit of software development. It will be inseparable after the beginning of the beginning, but it is inseparable from a habit.

Daily Build now has a lot of popular tools, such as Final Builder, support scripting writing, is a very good tool. But there is no money to buy tools. In fact, simply use the script to write a batch tool to perform Daily Build, or you can basically implement the DAILY Build's function. The following has been Source Safe Delphi as an example to implement Daily Build.

:: Daily Build Script

:: Viery 2004/07/20

:: Your Project's Path in vss

Set ssproject = "$ / project1 / source"

:: Your VSS Username and Password

Set username = viery

SET Password = Password

:: Path to vss Command Line Tool and the VSS DB you want to use.

SET VSSPATH = "C: /Develop/vss/win32/ss.exe"

Set ssdir = c: / wevelop / vss

:: Path to the Directory where you will be keeping the archive

SET ArchivePath = C: / Project / Build

:: Path to the delphi executable.

SET DELPHIPATH = "c: / program files / borland / delphi7 / bin / dcc32.exe"

:: Path to Library

set

Delphi

= "C: / Program Files / Borland / Delphi7"

::

Delphi

Project Name

Set projectname = Project1

:: LibPath

Set libpath = "c: / program files / borland / delphi7 / lib;"

:: Begin Code

FOR / F "tokens = 2-4 delims = / -" %% a in ('Date / T') do set strdate = %% C %% a %% B

MKDIR% ArchivePath% /% strdate% / abc0def

CD% ArchivePath% /% strdate%

% Vsspath% get% ssProject% -Y% username%,% password% -r -i-

% Delphipath% -U% libpath% -nc: / project / build / dcu% ArchivePath% /% strdate% /% projectname%

:: Archive

:: Move to Release Location

:: Label The Files

% Vsspath% label% ssproject% -l% strdate% -Y% username%,% password% -i - :: send emails to all to report

The above is a basic daily build script, the basic features of the implementation include:

1. Get Lastest Version from Source Safe

2. Call Delphi compile, create the latest version

3. Publish the new version to a specific version of the directory

4. Compress, release, send email

5. Put the latest version number Label source code.

Then set this batch to the Windows scheduling task to perform simple Daily Build management every night.

Starting from simplicity, Daily Build, the most important thing is to start.

转载请注明原文地址:https://www.9cbs.com/read-116567.html

New Post(0)