Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 22 additions & 6 deletions .github/workflows/sdk_generation_mistralai_sdk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -117,23 +117,39 @@ jobs:

CURRENT=$(grep '^version = ' pyproject.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
if [ "$CURRENT" = "$VERSION" ]; then
echo "Version already aligned to $VERSION"
exit 0
echo "pyproject.toml already aligned to $VERSION"
else
echo "Updating version from $CURRENT to $VERSION"
uv version "$VERSION"
fi

echo "Updating version from $CURRENT to $VERSION"
uv version "$VERSION"
VERSION="$VERSION" python - <<'PY'
import os
import re
from pathlib import Path

version = os.environ["VERSION"]
path = Path("src/mistralai/client/_version.py")
text = path.read_text()
text = re.sub(r'__version__: str = "[^"]+"', f'__version__: str = "{version}"', text)
text = re.sub(
r'__user_agent__: str = "speakeasy-sdk/python [^ ]+ ',
f'__user_agent__: str = "speakeasy-sdk/python {version} ',
text,
)
path.write_text(text)
PY

- name: Commit and push
if: steps.branch-exists.outputs.exists == 'true'
run: |
git config user.email "action@github.com"
git config user.name "GitHub Action"
git add pyproject.toml uv.lock
git add pyproject.toml uv.lock src/mistralai/client/_version.py
if git diff --cached --quiet; then
echo "No changes to commit"
else
VERSION=$(grep '^version = ' pyproject.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
git commit -m "chore: align pyproject.toml and uv.lock to version $VERSION"
git commit -m "chore: align package version files to version $VERSION"
git push
fi
4 changes: 2 additions & 2 deletions src/mistralai/client/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
import importlib.metadata

__title__: str = "mistralai"
__version__: str = "2.5.0"
__version__: str = "2.5.1"
__openapi_doc_version__: str = "1.0.0"
__gen_version__: str = "2.884.13"
__user_agent__: str = "speakeasy-sdk/python 2.5.0 2.884.13 1.0.0 mistralai"
__user_agent__: str = "speakeasy-sdk/python 2.5.1 2.884.13 1.0.0 mistralai"

try:
if __package__ is not None:
Expand Down
Loading