Fix the match pattern for the version bump tool (#34982)
* Update pattern in version bump tool to use two digits * Update README for version bump for pnpm7 parameter order
This commit is contained in:
parent
868f581af8
commit
c6eab3b4b2
|
@ -9,7 +9,7 @@
|
||||||
Bump WooCommerce to version 7.1.0:
|
Bump WooCommerce to version 7.1.0:
|
||||||
|
|
||||||
```
|
```
|
||||||
pnpm run version --filter version-bump -- bump woocommerce -v 7.1.0
|
pnpm --filter version-bump run version bump woocommerce -v 7.1.0
|
||||||
```
|
```
|
||||||
|
|
||||||
**Arguments**:
|
**Arguments**:
|
||||||
|
|
|
@ -25,7 +25,7 @@ export const updateReadmeStableTag = async (
|
||||||
const readmeContents = await readFile( filePath, 'utf8' );
|
const readmeContents = await readFile( filePath, 'utf8' );
|
||||||
|
|
||||||
const updatedReadmeContents = readmeContents.replace(
|
const updatedReadmeContents = readmeContents.replace(
|
||||||
/Stable tag: \d.\d.\d\n/m,
|
/Stable tag: \d+\.\d+\.\d+\n/m,
|
||||||
`Stable tag: ${ nextVersion }\n`
|
`Stable tag: ${ nextVersion }\n`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ export const updateReadmeChangelog = async (
|
||||||
const readmeContents = await readFile( filePath, 'utf8' );
|
const readmeContents = await readFile( filePath, 'utf8' );
|
||||||
|
|
||||||
const updatedReadmeContents = readmeContents.replace(
|
const updatedReadmeContents = readmeContents.replace(
|
||||||
/= \d.\d.\d \d\d\d\d-XX-XX =\n/m,
|
/= \d+\.\d+\.\d+ \d\d\d\d-XX-XX =\n/m,
|
||||||
`= ${ nextVersion } ${ new Date().getFullYear() }-XX-XX =\n`
|
`= ${ nextVersion } ${ new Date().getFullYear() }-XX-XX =\n`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ export const updateClassPluginFile = async (
|
||||||
const classPluginFileContents = await readFile( filePath, 'utf8' );
|
const classPluginFileContents = await readFile( filePath, 'utf8' );
|
||||||
|
|
||||||
const updatedClassPluginFileContents = classPluginFileContents.replace(
|
const updatedClassPluginFileContents = classPluginFileContents.replace(
|
||||||
/public \$version = '\d.\d.\d';\n/m,
|
/public \$version = '\d+\.\d+\.\d+';\n/m,
|
||||||
`public $version = '${ nextVersion }';\n`
|
`public $version = '${ nextVersion }';\n`
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ export const updatePluginFile = async (
|
||||||
const pluginFileContents = await readFile( filePath, 'utf8' );
|
const pluginFileContents = await readFile( filePath, 'utf8' );
|
||||||
|
|
||||||
const updatedPluginFileContents = pluginFileContents.replace(
|
const updatedPluginFileContents = pluginFileContents.replace(
|
||||||
/Version: \d.\d.\d.*\n/m,
|
/Version: \d+\.\d+\.\d+.*\n/m,
|
||||||
`Version: ${ nextVersion }\n`
|
`Version: ${ nextVersion }\n`
|
||||||
);
|
);
|
||||||
await writeFile( filePath, updatedPluginFileContents );
|
await writeFile( filePath, updatedPluginFileContents );
|
||||||
|
|
Loading…
Reference in New Issue