forked from langchain-ai/deepagents
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (42 loc) · 1.91 KB
/
check_versions.yml
File metadata and controls
51 lines (42 loc) · 1.91 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Ensures version numbers in pyproject.toml and version.py stay in sync.
#
# (Prevents releases with mismatched version numbers)
name: "🔍 Check Version Equality"
on:
pull_request:
paths:
- "libs/deepagents/pyproject.toml"
- "libs/deepagents/deepagents/_version.py"
- "libs/cli/pyproject.toml"
- "libs/cli/deepagents_cli/_version.py"
permissions:
contents: read
jobs:
check_version_equality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: "✅ Verify pyproject.toml & _version.py Match"
run: |
# Check deepagents versions
DEEPAGENTS_PYPROJECT_VERSION=$(grep -Po '(?<=^version = ")[^"]*' libs/deepagents/pyproject.toml)
DEEPAGENTS_VERSION_PY_VERSION=$(grep -Po '(?<=^__version__ = ")[^"]*' libs/deepagents/deepagents/_version.py)
if [ "$DEEPAGENTS_PYPROJECT_VERSION" != "$DEEPAGENTS_VERSION_PY_VERSION" ]; then
echo "deepagents versions in pyproject.toml and _version.py do not match!"
echo "pyproject.toml version: $DEEPAGENTS_PYPROJECT_VERSION"
echo "_version.py version: $DEEPAGENTS_VERSION_PY_VERSION"
exit 1
else
echo "deepagents versions match: $DEEPAGENTS_PYPROJECT_VERSION"
fi
# Check deepagents-cli versions
CLI_PYPROJECT_VERSION=$(grep -Po '(?<=^version = ")[^"]*' libs/cli/pyproject.toml)
CLI_VERSION_PY_VERSION=$(grep -Po '(?<=^__version__ = ")[^"]*' libs/cli/deepagents_cli/_version.py)
if [ "$CLI_PYPROJECT_VERSION" != "$CLI_VERSION_PY_VERSION" ]; then
echo "deepagents-cli versions in pyproject.toml and _version.py do not match!"
echo "pyproject.toml version: $CLI_PYPROJECT_VERSION"
echo "_version.py version: $CLI_VERSION_PY_VERSION"
exit 1
else
echo "deepagents-cli versions match: $CLI_PYPROJECT_VERSION"
fi