Skip to content

Commit

Permalink
try with fetch depth
Browse files Browse the repository at this point in the history
  • Loading branch information
artyom-jaksov-tl committed Oct 2, 2024
1 parent fafefd2 commit d0d7daf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/check-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
with:
fetch-depth: 0

- name: Set OLD_VERSION from etc/config.xml if merge would modify it
run: |
echo "OLD_VERSION=$(git log main..HEAD --cherry -p -- etc/config.xml | grep '\-.\s*.\<version\>' | tr -d '\-[:blank:]\n' | sed -e 's/<version>\(.*\)<\/version>/\1/')" >> $GITHUB_ENV
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..HEAD --cherry -p -- etc/config.xml | grep '\+.\s*.\<version\>' | tr -d '+[:blank:]\n' | sed -e 's/<version>\(.*\)<\/version>/\1/')" >> $GITHUB_ENV
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: |
Expand Down

0 comments on commit d0d7daf

Please sign in to comment.