This documentation relates to QuickBuild 10.0.x
Select here if you are using a different version

Read Version from File

Situation

Control build version with a text file stored in SCM.

Demonstration

  1. Run the demo configuration.
  2. Navigate to workspace area of the configuration and check content of version.txt. Version of the newly generated build will remain the same as content of this file.

Resolution

Check general setting of the demo configuration, the next version is defined as below:

${groovy:
import com.pmease.quickbuild.util.FileUtils
FileUtils.createDir(configuration.workspaceDir)
def repo = repositories.get("repo")
repo.takeSnapshot()
return repo.sourceViewSupport.readSourceAsString("build/version.txt")
}

This tells QuickBuild to read content of file /demos/componentA/trunk/version.txt from SCM repository and return it as version of next build.

Labels:

Enter labels to add to this page:
Wait Image 
Looking for a label? Just start typing.