Scripted Builds

The goal of scripted builds is to automate the entire process of building your system. As a result, your system is built the same way every time. This eliminates hidden errors and makes it easier to bring new developers into your team. It also makes it easier to test and release your software.

Many tools are available for creating scripted builds. Most development environments include a build tool, which is what teams generally use. For example, C and C++ projects normally use make, whereas Java projects normally use Ant. No matter which system your team uses, the goal is to have a single command or script that you can run to build all of your software. That build script should be under SCM so that you can check out your project on any machine and successfully build your system.

The most common problem that teams run into when creating a scripted build system is leaving out key components. Your build script should set all necessary environment variables, and you should include all data files and correct versions of all dependent libraries in your SCM system. It may seem like overkill to include dependent libraries, but it will make your builds more robust by guaranteeing that you are linking against tested versions of libraries instead of relying on older or newer libraries that may be installed on a target system.

You must also be vigilant in maintaining your scripted build system. It is easy to allow manual procedures to creep back into your build process, so test ...

Get The Art of Lean Software Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.