Skip to content

Commit ac03e60

Browse files
committed
Ensure n.e.x.t versions are updated in readme.txt
1 parent f9f040f commit ac03e60

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

bin/plugin/commands/since.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,18 @@ exports.handler = async ( opt ) => {
101101
}
102102
}
103103

104+
// Update versions in Changelog and Upgrade Notices.
105+
const readmeContentUpdated = readmeContent.replace(
106+
/(^= )(n\.e\.x\.t)( =$)/gm,
107+
function ( matches, before, next, after ) {
108+
replacementCount++;
109+
return before + version + after;
110+
}
111+
);
112+
if ( readmeContent !== readmeContentUpdated ) {
113+
fs.writeFileSync( readmeFile, readmeContentUpdated );
114+
}
115+
104116
const commonMessage = `Using version ${ version } for ${ pluginSlug }: `;
105117
if ( replacementCount > 0 ) {
106118
log(

0 commit comments

Comments
 (0)