woocommerce/plugins/woocommerce-blocks/bin/version-changes.sh

23 lines
951 B
Bash
Raw Normal View History

#!/bin/sh
VERSION=${VERSION:=\$VID\:\$}
IS_PRE_RELEASE=${IS_PRE_RELEASE:=false}
# replace all instances of $VID:$ with the release version but only when not pre-release.
if [ $IS_PRE_RELEASE = false ]; then
find ./src woocommerce-gutenberg-products-block.php -name "*.php" -print0 | xargs -0 perl -i -pe 's/\$VID:\$/'${VERSION}'/g'
Release: 3.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2887) * add changelog to readme.txt * Add testing docs for release * add some new commands to help with release testing phase * Add testing notes for 3.0.0 * fix testing note typo * updae notest to reference the new package-plugin:deploy script for use as part of the release process * Add note about creating manual tag for the release. * automate creation of dev tag for release. * remove release branch from travis branches because we now do pull requests for releases * remove duplicate back order badge for cart (https://github.com/woocommerce/woocommerce-blocks/pull/2890) * update zip link in testing notes * only update stable version in readme.txt if not a pre-release * Add handling for conditional github release creation based on WP deploy question * add distignore fir wp deploy builds * Cart & Checkout: fix '0' visible when product stock was 0 and it allowed backorders (https://github.com/woocommerce/woocommerce-blocks/pull/2891) * Create wordpress-deploy.yml * fix cod not accounting for global rate values (https://github.com/woocommerce/woocommerce-blocks/pull/2894) * ensure we’re only running checks for `wc_reserved_stock` table when necessary (https://github.com/woocommerce/woocommerce-blocks/pull/2895) * update readme.txt changelog * remove unnecesary variable definitions * update github deploy script * Bumping version strings to new version. * add missing step for checking out code from tag * fix exclusion for docker-compose.yml * fix zip name (it differs from repository name) Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-07-22 16:36:55 +00:00
# Update version number in readme.txt but only if not pre-release
perl -i -pe 's/Stable tag:*.+/Stable tag: '${VERSION}'/' readme.txt
fi
# Update version in main plugin file
perl -i -pe 's/Version:*.+/Version: '${VERSION}'/' woocommerce-gutenberg-products-block.php
# Update version in package.json
perl -i -pe 's/"version":*.+/"version": "'${VERSION}'",/' package.json
# Update version in src/Package.php
perl -i -pe "s/version \= '*.+';/version = '${VERSION}';/" src/Package.php
# Add version to composer.json
perl -i -pe 's/"type":*.+/"type":"wordpress-plugin",\n\t"version": "'${VERSION}'",/' composer.json