File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,19 +47,32 @@ jobs:
4747 git config user.name "github-actions[bot]"
4848 git config user.email "github-actions[bot]@users.noreply.github.com"
4949
50- - name : Update composer.json version
50+ - name : Update version
5151 env :
5252 VERSION_OUTPUT : ${{ steps.version.outputs.version }}
5353 run : |
54+ # Update composer.json
5455 jq --arg version "${VERSION_OUTPUT}" '.version = $version' composer.json > composer.json.tmp
5556 mv composer.json.tmp composer.json
57+
58+ # Update Model/Client.php (line 45)
59+ sed -i.bak -E "s/BitPay_Magento2_v[0-9]+\.[0-9]+\.[0-9]+/BitPay_Magento2_v${VERSION_OUTPUT}/" Model/Client.php
60+ rm Model/Client.php.bak
61+
62+ # Update Model/Config.php (line 32)
63+ sed -i.bak -E "s/Bitpay_BPCheckout_Magento2_[0-9]+\.[0-9]+\.[0-9]+/Bitpay_BPCheckout_Magento2_${VERSION_OUTPUT}/" Model/Config.php
64+ rm Model/Config.php.bak
65+
66+ # Update etc/module.xml (line 9)
67+ sed -i.bak -E "s/setup_version=\"[0-9]+\.[0-9]+\.[0-9]+\"/setup_version=\"${VERSION_OUTPUT}\"/" etc/module.xml
68+ rm etc/module.xml.bak
5669
5770 - name : Commit version update
5871 env :
5972 VERSION_INPUT : ${{ inputs.version }}
6073 BRANCH_INPUT : ${{ inputs.branch }}
6174 run : |
62- git add composer.json
75+ git add composer.json Model/Client.php Model/Config.php etc/module.xml
6376 git commit -m "Bump version to ${VERSION_INPUT}"
6477 git push origin "${BRANCH_INPUT}"
6578
You can’t perform that action at this time.
0 commit comments