File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
docs/input/docs/reference Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -82,6 +82,30 @@ assembly-informational-format: "{Major}.{Minor}.{Patch}-{CommitsSinceVersionSour
8282assembly-informational-format: "{SemVer}-{BranchName:l}"
8383` ` `
8484
85+ # # Legacy .NET Composite Format Syntax
86+
87+ GitVersion maintains backward compatibility with legacy .NET composite format syntax using semicolons for positive/negative/zero sections :
88+
89+ ` ` ` yaml
90+ # Legacy zero-padded with empty fallback
91+ assembly-informational-format: "{Major}.{Minor}.{Patch}-{CommitsSinceVersionSource:0000;;''}"
92+ # Result: "6.13.54-0002" (or "6.13.54" when CommitsSinceVersionSource is 0)
93+
94+ # Three-section format: positive;negative;zero
95+ assembly-informational-format: "{Value:positive;negative;zero}"
96+
97+ # Two-section format: positive;negative
98+ assembly-informational-format: "{Value:pos;neg}"
99+ ` ` `
100+
101+ **Format Sections:**
102+ - **First section**: Used for positive values
103+ - **Second section**: Used for negative values
104+ - **Third section**: Used for zero values (optional)
105+ - **Empty quotes** (`''` or `""`) create empty output
106+
107+ **Mixed Syntax:** You can combine legacy semicolon syntax with modern `??` fallback syntax in the same template.
108+
85109# # Examples
86110
87111Based on actual test cases from the implementation :
You can’t perform that action at this time.
0 commit comments