craft: S4 truncate path — CraftReplDev::truncate #309
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check Version Update | |
| on: | |
| pull_request: | |
| types: [opened, edited, synchronize] | |
| jobs: | |
| check-file: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Check if version bump is required | |
| run: | | |
| changed=$(git diff --name-only HEAD^1 HEAD) | |
| non_test=$(echo "$changed" | grep -Ev '^src/test/|CMakeLists\.txt$|^\.github/|^\.jenkins|\.md$' || true) | |
| if [ -z "$non_test" ]; then | |
| echo "Only test files changed — version bump not required" | |
| exit 0 | |
| fi | |
| if git diff -r HEAD^1 HEAD -- conanfile.py | grep -E "[ ]+version = "; then | |
| echo "Version is updated with this PR, OK" | |
| else | |
| echo "Conan version is not updated with this PR. Please update that to allow PR merge" | |
| exit 1 | |
| fi |