@@ -29,6 +29,7 @@ public static Regex GetOrAdd([StringSyntax(StringSyntaxAttribute.Regex)] string
29
29
[ Common . SwitchArgumentRegexPattern ] = Common . SwitchArgumentRegex ,
30
30
[ Common . ObscurePasswordRegexPattern ] = Common . ObscurePasswordRegex ,
31
31
[ Common . ExpandTokensRegexPattern ] = Common . ExpandTokensRegex ,
32
+ [ Common . SanitizeNameRegexPattern ] = Common . SanitizeNameRegex ,
32
33
[ Configuration . DefaultTagPrefixRegexPattern ] = Configuration . DefaultTagPrefixRegex ,
33
34
[ Configuration . DefaultVersionInBranchRegexPattern ] = Configuration . DefaultVersionInBranchRegex ,
34
35
[ Configuration . MainBranchRegexPattern ] = Configuration . MainBranchRegex ,
@@ -50,6 +51,7 @@ public static Regex GetOrAdd([StringSyntax(StringSyntaxAttribute.Regex)] string
50
51
[ Output . AssemblyVersionRegexPattern ] = Output . AssemblyVersionRegex ,
51
52
[ Output . AssemblyInfoVersionRegexPattern ] = Output . AssemblyInfoVersionRegex ,
52
53
[ Output . AssemblyFileVersionRegexPattern ] = Output . AssemblyFileVersionRegex ,
54
+ [ Output . SanitizeAssemblyInfoRegexPattern ] = Output . SanitizeAssemblyInfoRegex ,
53
55
[ Output . CsharpAssemblyAttributeRegexPattern ] = Output . CsharpAssemblyAttributeRegex ,
54
56
[ Output . FsharpAssemblyAttributeRegexPattern ] = Output . FsharpAssemblyAttributeRegex ,
55
57
[ Output . VisualBasicAssemblyAttributeRegexPattern ] = Output . VisualBasicAssemblyAttributeRegex ,
@@ -84,6 +86,9 @@ internal static partial class Common
84
86
[ StringSyntax ( StringSyntaxAttribute . Regex ) ]
85
87
internal const string ExpandTokensRegexPattern = """{((env:(?<envvar>\w+))|(?<member>\w+))(\s+(\?\?)??\s+((?<fallback>\w+)|"(?<fallback>.*)"))??}""" ;
86
88
89
+ [ StringSyntax ( StringSyntaxAttribute . Regex , Options ) ]
90
+ internal const string SanitizeNameRegexPattern = "[^a-zA-Z0-9-]" ;
91
+
87
92
[ GeneratedRegex ( SwitchArgumentRegexPattern , Options ) ]
88
93
public static partial Regex SwitchArgumentRegex ( ) ;
89
94
@@ -92,6 +97,9 @@ internal static partial class Common
92
97
93
98
[ GeneratedRegex ( ExpandTokensRegexPattern , Options ) ]
94
99
public static partial Regex ExpandTokensRegex ( ) ;
100
+
101
+ [ GeneratedRegex ( SanitizeNameRegexPattern , Options ) ]
102
+ public static partial Regex SanitizeNameRegex ( ) ;
95
103
}
96
104
97
105
internal static partial class Configuration
@@ -231,6 +239,9 @@ internal static partial class Output
231
239
[ StringSyntax ( StringSyntaxAttribute . Regex ) ]
232
240
internal const string SanitizeParticipantRegexPattern = "[^a-zA-Z0-9]" ;
233
241
242
+ [ StringSyntax ( StringSyntaxAttribute . Regex ) ]
243
+ internal const string SanitizeAssemblyInfoRegexPattern = "[^0-9A-Za-z-.+]" ;
244
+
234
245
[ GeneratedRegex ( AssemblyVersionRegexPattern , Options ) ]
235
246
public static partial Regex AssemblyVersionRegex ( ) ;
236
247
@@ -251,6 +262,9 @@ internal static partial class Output
251
262
252
263
[ GeneratedRegex ( SanitizeParticipantRegexPattern , Options ) ]
253
264
public static partial Regex SanitizeParticipantRegex ( ) ;
265
+
266
+ [ GeneratedRegex ( SanitizeAssemblyInfoRegexPattern , RegexOptions . IgnorePatternWhitespace | Options ) ]
267
+ public static partial Regex SanitizeAssemblyInfoRegex ( ) ;
254
268
}
255
269
256
270
internal static partial class VersionCalculation
0 commit comments