Skip to content

Commit db8e055

Browse files
committed
chore(ci): update every PostHog SDK dependency
1 parent 06a532b commit db8e055

1 file changed

Lines changed: 22 additions & 7 deletions

File tree

‎.github/workflows/posthog-upgrade.yml‎

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ jobs:
5252
run: |
5353
for i in $(seq 1 "$RETRY_TIMES"); do
5454
# Retry because the PyPI index is eventually consistent.
55-
if uv add --no-sync --refresh-package "$PACKAGE_NAME" "$PACKAGE_NAME==$PACKAGE_VERSION"; then
55+
if uv add --no-sync --refresh-package "$PACKAGE_NAME" "$PACKAGE_NAME==$PACKAGE_VERSION" && \
56+
(cd services/llm-gateway && uv add --no-sync --refresh-package "$PACKAGE_NAME" "$PACKAGE_NAME>=$PACKAGE_VERSION"); then
5657
break
5758
else
5859
if [ "$i" -eq "$RETRY_TIMES" ]; then
@@ -61,10 +62,24 @@ jobs:
6162
sleep "$RETRY_WAIT_SECONDS"
6263
fi
6364
done
64-
if git diff --quiet pyproject.toml uv.lock; then
65-
echo "Failed to update $PACKAGE_NAME to $PACKAGE_VERSION" >&2
66-
exit 1
67-
fi
65+
66+
sed -i "s/^posthoganalytics==.*/posthoganalytics==$PACKAGE_VERSION/" common/ingestion/acceptance_tests/requirements.txt
67+
sed -i "s/^posthog>=.*/posthog>=$PACKAGE_VERSION/" tools/infra-scripts/clitools/requirements.txt
68+
69+
expected_files=(
70+
pyproject.toml
71+
uv.lock
72+
services/llm-gateway/pyproject.toml
73+
services/llm-gateway/uv.lock
74+
common/ingestion/acceptance_tests/requirements.txt
75+
tools/infra-scripts/clitools/requirements.txt
76+
)
77+
for file in "${expected_files[@]}"; do
78+
if git diff --quiet -- "$file"; then
79+
echo "Failed to update $file to $PACKAGE_VERSION" >&2
80+
exit 1
81+
fi
82+
done
6883
6984
- name: Generate branch name
7085
id: generate-branch-name
@@ -91,9 +106,9 @@ jobs:
91106
body: |
92107
## Changes
93108
94-
${{ github.event.inputs.package_name }} version ${{ github.event.inputs.package_version }} has been released. This updates PostHog to use it.
109+
PostHog Python SDK version ${{ github.event.inputs.package_version }} has been released. This updates the `posthoganalytics` and `posthog` dependency declarations to the same SDK version.
95110
96-
[GitHub releases](https://github.com/PostHog/posthog-python/releases) • [PyPI releases](https://pypi.org/project/${{ github.event.inputs.package_name }}/#history)
111+
[GitHub releases](https://github.com/PostHog/posthog-python/releases) • [`posthoganalytics` on PyPI](https://pypi.org/project/posthoganalytics/#history) • [`posthog` on PyPI](https://pypi.org/project/posthog/#history)
97112
98113
- name: Output pull request result
99114
shell: bash

0 commit comments

Comments
 (0)