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
Copy file name to clipboardExpand all lines: Tasks/UseDotNetV2/models.ts
+13-7Lines changed: 13 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -121,13 +121,13 @@ export class VersionParts {
121
121
try{
122
122
letparts=version.split('.');
123
123
// validate version
124
-
if((parts.length!=3)||// check if the version has 3 parts
124
+
if((parts.length<3)||// check if the version has at least 3 parts
125
125
!parts[0]||// The major version must always be set
126
126
!parts[1]||// The minor version must always be set
127
127
!parts[2]||// The patch version must always be set
128
128
Number.isNaN(Number.parseInt(parts[0]))||// the major version number must be a number
129
129
Number.isNaN(Number.parseInt(parts[1]))||// the minor version number must be a number
130
-
Number.isNaN(Number.parseInt(parts[2].split('-')[0]))// the patch version number must be a number. (the patch version can have a '-' because of version numbers like: 1.0.0-beta-50)
130
+
Number.isNaN(Number.parseInt(parts[2].split(/\-|\+/)[0]))// the patch version number must be a number. (the patch version can have a '-', or a '+' because of version numbers like: 1.0.0-beta-50)
0 commit comments