Skip to content

Commit 8d9177c

Browse files
committed
Use uv add instead of sed to pin intra-workspace dep
uv add --package palace-opds 'palace-util==X.Y.Z' rewrites the dependency spec in pyproject.toml without relying on a literal text match (sed would break if the dep line ever changes formatting). It resolves against the workspace source, so the pinned version does not need to exist on PyPI yet — important for the publish step, where the version is being uploaded now.
1 parent e91387b commit 8d9177c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/workflows/publish-pypi.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,12 @@ jobs:
8484
# uv build preserves workspace deps as bare names in Requires-Dist
8585
# (e.g. `palace-util` with no version). For PyPI we need an exact pin
8686
# so a consumer installing palace-opds resolves the matching
87-
# palace-util version.
87+
# palace-util version. `uv add` rewrites the dependency spec in
88+
# palace-opds/pyproject.toml safely (no text-match fragility) — and
89+
# resolves against the workspace source, so it doesn't matter that
90+
# the pinned version isn't on PyPI yet.
8891
if: matrix.package == 'palace-opds'
89-
run: |
90-
sed -i 's|"palace-util"|"palace-util==${{ steps.version.outputs.version }}"|' \
91-
packages/palace-opds/pyproject.toml
92+
run: uv add --package palace-opds "palace-util==${{ steps.version.outputs.version }}"
9293

9394
- name: Build ${{ matrix.package }}
9495
run: uv build --package ${{ matrix.package }}

0 commit comments

Comments
 (0)