You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The channel name can also be used (generally as part of the suffix):
48
48
49
-
```
49
+
```text
50
50
Octopus.Release.Channel.Name
51
51
```
52
52
53
53
The version can also include Octopus *semantic version mask* characters i and c referring to the **incremented** and **current** values of the version, respectively. For example:
54
54
55
-
```
55
+
```text
56
56
2.1.c.i
57
57
```
58
58
59
59
Finally, date fields can be also be used, for example:
The full power of the [Octopus variable syntax](/docs/projects/variables/variable-substitutions/#complex-syntax) (powered by [Octostache](https://github.com/OctopusDeploy/Octostache)) is available in version templates. In particular, [conditional expressions](/docs/projects/variables/variable-substitutions/#conditionals) can be used to model some complex scenarios.
74
+
The full power of the [Octopus variable syntax](/docs/projects/variables/variable-substitutions/#complex-syntax) (powered by [Octostache](https://github.com/OctopusDeploy/Octostache)) is available in version templates. In particular, [conditional expressions](/docs/projects/variables/variable-substitutions/#conditionals) can be used to model some complex scenarios.
75
75
76
76
### Example: Date with incrementing revision
77
77
78
-
A relatively common versioning scheme is:
78
+
A relatively common versioning scheme is:
79
79
80
-
```
80
+
```text
81
81
YEAR.MONTH.DAY.REVISION
82
82
```
83
83
84
-
where `REVISION` starts at 0 each day and increments with each release. i.e. The releases on one day might be `2020.10.2.0`, `2020.10.2.1`, `2020.10.2.2` ... and the following day may be: `2020.10.3.0`, `2020.10.3.1` etc.
84
+
where `REVISION` starts at 0 each day and increments with each release. i.e. The releases on one day might be `2020.10.2.0`, `2020.10.2.1`, `2020.10.2.2` ... and the following day may be: `2020.10.3.0`, `2020.10.3.1` etc.
85
85
86
86
This can be achieved using the following expression:
The difference is that the `i` is not replaced until the release is saved where the complex expression will show the next increment number before it is saved.
110
+
The `i` mask character increments the previous release's revision component by one on every release. Note
111
+
that the revision component will reset whenever any part of the date changes from the previous release.
0 commit comments