Skip to content
This repository was archived by the owner on Feb 23, 2024. It is now read-only.

Commit 71775f2

Browse files
authored
Update version script to account for changes in version setting on bootstrap (#1158)
* update version change script so it accounts for the new version setting in Package * fix hardcoded version string in replacement script * change version registration block * improve specificity of version string change
1 parent 316f3d4 commit 71775f2

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bin/version-changes.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@ perl -i -pe 's/Stable tag:*.+/Stable tag: '${VERSION}'/' readme.txt
1212

1313
# Update version in main plugin file
1414
perl -i -pe 's/Version:*.+/Version: '${VERSION}'/' woocommerce-gutenberg-products-block.php
15+
perl -i -pe "s/version \= '*.+';/version = '${VERSION}';/" woocommerce-gutenberg-products-block.php
1516

1617
# Update version in package.json
1718
perl -i -pe 's/"version":*.+/"version": "'${VERSION}'",/' package.json
18-
19-
# Update version in main file
20-
perl -i -pe "s/VERSION =*.+/VERSION = '${VERSION}';/" src/Package.php

woocommerce-gutenberg-products-block.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ function wc_blocks_container( $reset = false ) {
8787
$container->register(
8888
Automattic\WooCommerce\Blocks\Domain\Package::class,
8989
function ( $container ) {
90+
// leave for automated version bumping.
91+
$version = '2.5.0-dev';
9092
return new Automattic\WooCommerce\Blocks\Domain\Package(
91-
'2.5.0-dev',
93+
$version,
9294
__FILE__
9395
);
9496
}

0 commit comments

Comments
 (0)