@@ -55,13 +55,13 @@ GitVersion introduces custom format specifiers for string case transformations t
55
55
56
56
# ## Available Case Formats
57
57
58
- | Format | Description | Example Input | Example Output |
59
- |--------|-------------|---------------| ----------------|
60
- | `u` | **Uppercase** - Converts entire string to uppercase | `feature-branch` | `FEATURE-BRANCH` |
61
- | `l` | **Lowercase** - Converts entire string to lowercase | `Feature-Branch` | `feature-branch` |
62
- | `t` | **Title Case** - Capitalizes first letter of each word | `feature-branch` | `Feature-Branch` |
63
- | `s` | **Sentence Case** - Capitalizes only the first letter | `feature-branch` | `Feature-branch` |
64
- | `c` | **PascalCase** - Removes separators and capitalizes each word | `feature-branch` | `FeatureBranch` |
58
+ | Format | Description | Example Input | Example Output |
59
+ |--------|--------------------------------------------------------------- |------------------|-- ----------------|
60
+ | `u` | **Uppercase** - Converts entire string to uppercase | `feature-branch` | `FEATURE-BRANCH` |
61
+ | `l` | **Lowercase** - Converts entire string to lowercase | `Feature-Branch` | `feature-branch` |
62
+ | `t` | **Title Case** - Capitalizes first letter of each word | `feature-branch` | `Feature-Branch` |
63
+ | `s` | **Sentence Case** - Capitalizes only the first letter | `feature-branch` | `Feature-branch` |
64
+ | `c` | **PascalCase** - Removes separators and capitalizes each word | `feature-branch` | `FeatureBranch` |
65
65
66
66
# ## Usage Examples
67
67
@@ -70,7 +70,7 @@ GitVersion introduces custom format specifiers for string case transformations t
70
70
branches:
71
71
feature:
72
72
label: "{BranchName:c}" # Converts to PascalCase
73
-
73
+
74
74
template: "{Major}.{Minor}.{Patch}-{PreReleaseLabel:l}.{CommitsSinceVersionSource:0000}"
75
75
` ` `
76
76
@@ -191,7 +191,7 @@ The formatting system uses `CultureInfo.InvariantCulture` by default through the
191
191
` ` ` csharp
192
192
// All environments produce the same output:
193
193
// {CommitsSinceVersionSource:N0} → "1,234"
194
- // {CommitDate:MMM dd, yyyy} → "Mar 15, 2024"
194
+ // {CommitDate:MMM dd, yyyy} → "Mar 15, 2024"
195
195
// {Major:C} → "¤1.00" (generic currency symbol)
196
196
` ` `
197
197
@@ -207,16 +207,16 @@ The following examples are verified by actual unit tests in the GitVersion codeb
207
207
assembly-informational-format: "{Major}.{Minor}.{Patch}-{CommitsSinceVersionSource:0000}"
208
208
` ` `
209
209
210
- **Test**: `VariableProviderTests.Format_Allows_CSharp_FormatStrings()`
211
- **Input**: `CommitsSinceVersionSource = 42`
210
+ **Test**: `VariableProviderTests.Format_Allows_CSharp_FormatStrings()`
211
+ **Input**: `CommitsSinceVersionSource = 42`
212
212
**Output**: `"1.2.3-0042"`
213
213
214
214
# ## String Case Transformations
215
215
216
216
` ` ` csharp
217
217
// From StringFormatterTests.cs
218
218
[TestCase("hello world", "c", "HelloWorld")] // PascalCase
219
- [TestCase("hello", "u", "HELLO")] // Uppercase
219
+ [TestCase("hello", "u", "HELLO")] // Uppercase
220
220
[TestCase("HELLO", "l", "hello")] // Lowercase
221
221
[TestCase("hello world", "t", "Hello World")] // Title Case
222
222
[TestCase("hELLO", "s", "Hello")] // Sentence Case
@@ -225,7 +225,7 @@ assembly-informational-format: "{Major}.{Minor}.{Patch}-{CommitsSinceVersionSour
225
225
# ## Numeric Format Specifiers
226
226
227
227
` ` ` csharp
228
- // From NumericFormatterTests.cs
228
+ // From NumericFormatterTests.cs
229
229
[TestCase("1234.5678", "n", "1,234.57")] // Number format
230
230
[TestCase("1234.5678", "f2", "1234.57")] // Fixed-point format
231
231
[TestCase("1234.5678", "f0", "1235")] // No decimals
@@ -249,4 +249,4 @@ assembly-informational-format: "{Major}.{Minor}.{Patch}-{CommitsSinceVersionSour
249
249
` ` `
250
250
251
251
[reference-configuration] : /docs/reference/configuration
252
- [variables] : /docs/reference/variables
252
+ [variables] : /docs/reference/variables
0 commit comments