Skip to content

Commit

Permalink
test new script
Browse files Browse the repository at this point in the history
  • Loading branch information
artyom-jaksov-tl committed Oct 2, 2024
1 parent 436ff05 commit c0f286b
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/check-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ jobs:
steps:
- uses: actions/checkout@v1

- name: Compare version
- name: Set OLD_VERSION from etc/config.xml if merge would modify it
run: |
[[ "$(cat ./etc/config.xml | grep \<version\> | sed -e 's/<version>\(.*\)<\/version>/\1/' | tr -d '[:blank:]')" == $(curl -s https://raw.githubusercontent.com/TrueLayer/magento2/refs/heads/main/etc/config.xml | grep \<version\> | sed -e 's/<version>\(.*\)<\/version>/\1/' | tr -d '[:blank:]') ]]
echo "OLD_VERSION=$(git log main.. --cherry -p -- etc/config.xml | grep '\-.\s*.\<version\>' | tr -d '\-[:blank:]\n' | sed -e 's/<version>\(.*\)<\/version>/\1/')" >> $GITHUB_ENV
- name: Set NEW_VERSION from etc/config.xml if merge would modify it
run: |
echo "NEW_VERSION=$(git log main.. --cherry -p -- etc/config.xml | grep '\+.\s*.\<version\>' | tr -d '+[:blank:]\n' | sed -e 's/<version>\(.*\)<\/version>/\1/')" >> $GITHUB_ENV
- name: Test that versions are not empty
run: |
[[ ! -z $OLD_VERSION ]] && [[ ! -z $NEW_VERSION ]]
- name: Test that versions are different
run: |
[[ $OLD_VERSION != $NEW_VERSION ]]

0 comments on commit c0f286b

Please sign in to comment.