Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Some object types are overloaded to behave like both objects and values. The most common time an object will be used as a variable is when an expression is used to get a repositories' source directory. For example, if I want to refer to a build's version I would use the expression "$Build.Version$". However, when typing that into an input field, you will note that "Version" is an object type that has children objects ("Default" and "DotNet"). If you select the "DotNet" item you will then get a drop down of items which are all value types ("Major", "Minor", "Build", "Revision"). If you wanted to get only the major version value of your version string then you would use the expression "$Build.Version.DotNet.Major$". Build Version is only one example where you may want to use the default value and not any of its children.

Here's a list of other important object types that have default values:

ExpressionValue
$Source.YourRepository$

The path to your Source directory within a build's workspace.

Equivalent to $Source.YourRepository.Path$

$Date$

Defaults to local time (of server).

Equivalent to $Date.Local$

$Server$

Default to Server Name.

Equivalent to $Server.HostName$