BuildMaster Documentation

BuildMaster - Set Build Number

  • Last Modified: 2020-06-26

This is generated from the built-in components of BuildMaster 6.2.13, and may be different than what you have installed (especially if you have extensions); go to [User Icon] > Documentation within your BuildMaster instance to see exactly what operations are available.

Set Build Number

Sets (changes) the build number of the currently executing build.

Script usage:

Set-BuildNumber <text>;

This operation may be prefixed with Core::, although this is a built-in namespace and isn't really necessary.

Arguments:

Name Format Script Usage Usage Notes
New build number (default)
text
BuildNumber
This argument is required.

Build Number in Context: This operation will do two things: change the BuildNumber in the database and create a runtime variable named $BuildNumber with the new build number. However, it will *not* update the execution context with the new BuildNumber; this means that, for some operations that rely on the BuildNumber in context (instead of looking up the BuildNumber based on the BuildId), this will likely result in a "build not found" or such error. To resolve this, explicitly pass in $BuildNumber as an argument. For example, if you create an artifact after setting the BuildNumber, explicitly pass in the BuildNumber.

Example:

# The build.xml file contains a project version we wish to show users in the build number
PSCall GLOBAL::ExtractProjectVersion
(
    buildFilePath: $WorkingDirectory\build.xml,
    OutputArg => $ProjectVersionTemp
);

# This will update the build number
Set-BuildNumber $ExtractProjectVersion.$BuildNumber;

Is this documentation incorrect or incomplete? Help us by contributing!

This documentation is licensed under CC-BY-SA-4.0 and stored in GitHub.

Generated from commit ced119d5 on master