Bump pygments from 2.19.2 to 2.20.0 #24
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: Versioning Checks | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| check-version-update: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check Out Code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Verify versions | |
| run: | | |
| BASE_SHA=$(git rev-parse origin/${{ github.base_ref }}) | |
| HEAD_SHA=$(git rev-parse origin/${{ github.head_ref }}) | |
| echo "Base ref: ${{ github.base_ref }}" | |
| echo "Base SHA: ${BASE_SHA}" | |
| echo "Head ref: ${{ github.head_ref }}" | |
| echo "Head SHA: ${HEAD_SHA}" | |
| CHANGED_FILES=$(git diff --name-only $BASE_SHA $HEAD_SHA './py3dinterpolations/') | |
| if [[ -n "$CHANGED_FILES" ]]; then | |
| echo "------------------------------------------" | |
| echo "There are changes in the py3dinterpolations folder" | |
| echo "------------------------------------------" | |
| echo "Checking project version..." | |
| head_version=$(git show HEAD:./pyproject.toml | grep -oP '^version = "\K[^"]+') | |
| echo "Head version: ${head_version}" | |
| if git show ${BASE_SHA}:./pyproject.toml &>/dev/null; then | |
| base_version=$(git show ${BASE_SHA}:./pyproject.toml | grep -oP '^version = "\K[^"]+') | |
| else | |
| base_version=$(git show ${BASE_SHA}:./setup.py | grep -oP 'version="\K[^"]+') | |
| fi | |
| echo "Base version: ${base_version}" | |
| if [ "$base_version" != "$head_version" ]; then | |
| echo "The version has been updated." | |
| else | |
| echo "Error: The version has not been updated." | |
| exit 1 | |
| fi | |
| echo "------------------------------------------" | |
| echo "Checking __init__.py version..." | |
| head_init_version=$(git show HEAD:./py3dinterpolations/__init__.py | grep -oP '__version__ = "\K[^"]+') | |
| echo "Head init version: ${head_init_version}" | |
| base_init_version=$(git show ${BASE_SHA}:./py3dinterpolations/__init__.py | grep -oP '__version__ = "\K[^"]+') | |
| echo "Base init version: ${base_init_version}" | |
| if [ "$base_init_version" != "$head_init_version" ]; then | |
| echo "The __version__ variable has been updated in package init." | |
| else | |
| echo "Error: The __version__ variable has not been updated in package init." | |
| exit 1 | |
| fi | |
| echo "------------------------------------------" | |
| echo "Checking they are equal..." | |
| if [ "$head_version" == "$head_init_version" ]; then | |
| echo "The versions are equal." | |
| else | |
| echo "Error: The versions are not equal." | |
| exit 1 | |
| fi | |
| else | |
| echo "There are no changes in the py3dinterpolations folder" | |
| exit 0 | |
| fi |