Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Bump pyvespa from 0.37.1 to 0.41.0 #437

Bump pyvespa from 0.37.1 to 0.41.0

Bump pyvespa from 0.37.1 to 0.41.0 #437

Workflow file for this run

name: check-pyproject-version
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
check_version:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install "toml==0.10.2"
- name: Compare Versions
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
PYPROJECT_VERSION=$(python -c "import toml; print(toml.load('pyproject.toml')['tool']['poetry']['version'])")
echo "PYPROJECT_VERSION=${PYPROJECT_VERSION}"
GITHUB_RELEASE_VERSION=$(curl --silent "https://api.github.com/repos/climatepolicyradar/data-access/releases/latest" | jq -r '.tag_name')
# remove the "v" from the version
GITHUB_RELEASE_VERSION=${GITHUB_RELEASE_VERSION#v}
echo "GITHUB_RELEASE_VERSION=${GITHUB_RELEASE_VERSION}"
# Check that semver tag is greater than the github release version
PYPROJECT_GREATER_THAN_GITHUB_RELEASE=$(python -c "from packaging.version import Version; print(Version('${PYPROJECT_VERSION}') > Version('${GITHUB_RELEASE_VERSION}'))")
if [[ PYPROJECT_GREATER_THAN_GITHUB_RELEASE ]]; then
echo "The pyproject.toml version is greater than the latest GitHub release."
else
echo "The pyproject.toml version is not greater than the latest GitHub release."
exit 1
fi