“...our confidence in the reliability and repeatability of the deployment process has been restored...” “...this is a very solid piece of software!” “...we implemented a *real* deployment process...” “...all of my projects are building wonderfully and are fully integrated into deployment...” “BuildMaster is absolutely swell!” “...it's 2:45 AM your time?! Do you guys never sleep?” “BuildMaster made us re-think what proper deployment is...” “...we can now react at the speed of business...” “...manual, error-prone deployments are a thing of the past...” “...BuildMaster makes sense of incremental builds and their very liquid feature sets...” “...the best thing since sliced bread when it comes to managing projects and their environments...” “...extremely capable software, especially in an enterprise environment...” “BuildMaster is a great tool for automating the build process, but stands head and shoulders above other tools...”

Displaying a Version Number

It is common to show users of a web site when the site was last published, typically by incrementing a build/revision number, or displaying a "last published" date. There are a variety of ways this can be achieved: from manually updating the date on the web server to reading from external data storage such as a file or database to display the value. With BuildMaster, it can be integrated as part of the build and deploy process.

Let's say our website has one extremely simple page:

<!DOCTYPE html PUBLIC “-//W3C//DTD HTML 3.2//EN”>
<html>
<head>
<title>Simple Website</title>
</head>
<body>
Version: [[unpublished]]
</body>
</html>

On a local workstation, the page outputs exactly what you'd expect:

Version: [[unpublished]]

Now assuming we have an application with a release created in BuildMaster, we just need to add an action that manipulates the file (or files if necessary) to replace any [[unpublished]] placeholders with the actual BuildMaster release & build number.

We can do this with the Search/Replace File Contents action:

image

This action will replace all instances of the text of your choosing with a value of your choosing. In this case, I'll want to use a built-in BuildMaster variable combination of %RELNO%.%BLDNO% . When it comes time for deployment, this variable combination will be replaced with the BuildMaster release number, a literal period, then the current build number. Here is an example action with the options filled in:

image

In my demonstration plan, I copy the files to the BuildMaster default directory, run the replacement, then copy the replaced file to an "output" directory on my machine:

image

Now, when I execute a build, the C:\Test\html\example.html file will be copied into the default directory, the [[unpublished]] text will be replaced with the current release & build numbers, and the output will be copied into C:\Test\html-replaced\example.html. Here is a simple diff between the two files that were built under release 6.3, build #3:

image

If you wanted to use a date instead, simply use %DATE:MM-dd-yyyy% (where MM-dd-yyyy is any valid .NET date/time format string) instead of %RELNO%.%BLDNO% and create a new build:

image

Text replacements can go beyond just version numbers and dates. BuildMaster's built-in variable engine provides the following other variables: