Skip to content

Commit 0c9d5c5

Browse files
jdxclaude
andcommitted
fix(release): query specific crate version in exists_on_crates check
The exists_on_crates function was using `cargo info <crate>` which only returns the latest version, causing the grep to miss older versions that already exist on crates.io. This led to duplicate publish attempts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 321980e commit 0c9d5c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xtasks/release-plz

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ git config user.email release@mise.jdx.dev
1515
exists_on_crates() {
1616
crate="$1"
1717
version="$2"
18-
if cargo info --registry "crates-io" --color never --quiet "$crate" | grep -E "^version:\s+$version$" >/dev/null 2>&1; then
18+
if cargo info --registry "crates-io" --color never --quiet "$crate@$version" 2>/dev/null | grep -qE "^version:\s+$version\b"; then
1919
return 0
2020
fi
2121
if curl -fsSL "https://crates.io/api/v1/crates/$crate/$version" >/dev/null 2>&1; then

0 commit comments

Comments
 (0)