@@ -38,19 +38,19 @@ async function checkPluginDirectory( pluginDirectory ) {
38
38
const readmeContents = fs . readFileSync ( readmeFilePath , 'utf-8' ) ;
39
39
40
40
const stableTagVersionMatches = readmeContents . match (
41
- / ^ S t a b l e t a g : \s * ( \d + \. \d + \. \d + (?: - \w + ) ? ) $ / m
41
+ / ^ S t a b l e t a g : \s * ( \d + \. \d + \. \d + (?: - [ \w \. ] + ) ? ) $ / m
42
42
) ;
43
43
if ( ! stableTagVersionMatches ) {
44
44
throw new Error ( `Unable to locate stable tag in ${ readmeFilePath } ` ) ;
45
45
}
46
46
const stableTagVersion = stableTagVersionMatches [ 1 ] ;
47
47
48
48
const latestChangelogMatches = readmeContents . match (
49
- / ^ = = C h a n g e l o g = = \n + = ( \d + \. \d + \. \d + (?: - \w + ) ? ) = $ / m
49
+ / ^ = = C h a n g e l o g = = \n + = ( \d + \. \d + \. \d + (?: - [ \w \. ] + ) ? ) = $ / m
50
50
) ;
51
51
if ( ! latestChangelogMatches ) {
52
52
throw new Error (
53
- 'Unable to latest version entry in readme changelog.'
53
+ 'Unable to locate latest version entry in readme changelog.'
54
54
) ;
55
55
}
56
56
const latestChangelogVersion = latestChangelogMatches [ 1 ] ;
@@ -71,7 +71,7 @@ async function checkPluginDirectory( pluginDirectory ) {
71
71
}
72
72
73
73
const headerVersionMatches = phpBootstrapFileContents . match (
74
- / ^ \* V e r s i o n : \s + ( \d + \. \d + \. \d + (?: - \w + ) ? ) $ / m
74
+ / ^ \* V e r s i o n : \s + ( \d + \. \d + \. \d + (?: - [ \w \. ] + ) ? ) $ / m
75
75
) ;
76
76
if ( ! headerVersionMatches ) {
77
77
throw new Error (
@@ -81,7 +81,7 @@ async function checkPluginDirectory( pluginDirectory ) {
81
81
const headerVersion = headerVersionMatches [ 1 ] ;
82
82
83
83
const phpLiteralVersionMatches = phpBootstrapFileContents . match (
84
- / ' ( \d + \. \d + \. \d + (?: - \w + ) ? ) ' /
84
+ / ' ( \d + \. \d + \. \d + (?: - [ \w \. ] + ) ? ) ' /
85
85
) ;
86
86
if ( ! phpLiteralVersionMatches ) {
87
87
throw new Error ( 'Unable to locate the PHP literal version.' ) ;
0 commit comments