Follow @RoyOsherove on Twitter

Build Pattern: Location Agnostic Script

Symptoms:

  • Running the build script on a machine where it was never run before requires extra pre-work to make the machine ready, such as mapping drives, creating a special build script folder etc.

Problem:

  • The build script uses hardcoded file and directory paths to find its dependent source files. For example, it searches for a solution file in Z:/SolutionFileName . That means the build script has specific requirements from its environment before running, which causes lots of menial, boring work to do before being able to run it.

Solution:

  • Have the script use only relative paths to find files.
  • Make the script part of source control, or deploy it into the root of the source control branch to build, so that it has access to all the files it needs

Build Pattern: Fill In the Blanks

Elastic, Agile, Adaptive Leadership Workshop, January 31 2013, Oslo