Skip to content

Commit 1be85ae

Browse files
committed
fix(ci): broaden internal dep pinning regex to cover bare nodedb crate
The explicit allowlist used in the prerelease pinning step omitted the bare `nodedb` crate (and any future crates like `nodedb-vector-gpu`), so for tags like `v0.3.0-beta.1` those deps stayed at `version = "0.3"` (`^0.3`), which Cargo cannot resolve against a prerelease. This broke both `publish-crates` and `build-server` jobs whenever a workspace member declared `nodedb = "^0.3"`. Replace the explicit crate-name alternation with a generic `nodedb[a-z0-9-]*` pattern in both jobs so every internal nodedb* path-dep is pinned to the exact prerelease version, and newly-added crates are covered automatically without updating the regex.
1 parent 25040fd commit 1be85ae

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,10 @@ jobs:
106106
# For pre-release versions, pin internal dep requirements so semver
107107
# "0.0.0" doesn't fail to match "0.0.0-beta.1"
108108
if [[ "$VERSION" == *-* ]]; then
109-
sed -i -E 's/(nodedb-(codec|bridge|wal|mem|crdt|raft|fts|types|vector|graph|spatial|strict|client|columnar|cluster|query|sql|array|physical) = \{ [^}]*version = )"[^"]*"/\1"='"$VERSION"'"/' Cargo.toml
109+
# Pin every internal nodedb* path-dep (bare `nodedb` included) to the
110+
# exact prerelease version. A generic match avoids the recurring bug
111+
# of forgetting to add a newly-introduced crate to an explicit list.
112+
sed -i -E 's/(nodedb[a-z0-9-]* = \{ [^}]*version = )"[^"]*"/\1"='"$VERSION"'"/' Cargo.toml
110113
echo "Updated internal dep versions to =$VERSION"
111114
fi
112115
@@ -233,7 +236,10 @@ jobs:
233236
# For pre-release versions, pin internal dep requirements so semver
234237
# "0" doesn't fail to match "0.0.0-beta.3"
235238
if [[ "$VERSION" == *-* ]]; then
236-
sed -i -E 's/(nodedb-(codec|bridge|wal|mem|crdt|raft|fts|types|vector|graph|spatial|strict|client|columnar|cluster|query|sql|array|physical) = \{ [^}]*version = )"[^"]*"/\1"='"$VERSION"'"/' Cargo.toml
239+
# Pin every internal nodedb* path-dep (bare `nodedb` included) to the
240+
# exact prerelease version. A generic match avoids the recurring bug
241+
# of forgetting to add a newly-introduced crate to an explicit list.
242+
sed -i -E 's/(nodedb[a-z0-9-]* = \{ [^}]*version = )"[^"]*"/\1"='"$VERSION"'"/' Cargo.toml
237243
echo "Updated internal dep versions to =$VERSION"
238244
fi
239245

0 commit comments

Comments
 (0)