Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion xtasks/release-plz
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,15 @@ get_latest_crates_version() {
cargo info --registry "crates-io" --color never --quiet "$crate" 2>/dev/null | grep "^version:" | cut -d' ' -f2 || echo ""
}

use_published_aqua_registry() {
local version="$1"

cargo rm aqua-registry
cargo rm --build aqua-registry
Comment thread
risu729 marked this conversation as resolved.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Fragile assumption about build-dependency presence

With set -euxo pipefail active, cargo rm --build aqua-registry will abort the entire release script if aqua-registry is ever removed from [build-dependencies] (e.g., after a future refactor). The function assumes both entries always co-exist with no guard or recovery path. Consider adding || true or a pre-flight check if you want the function to be resilient to that scenario.

cargo add "aqua-registry@$version"
cargo add --build "aqua-registry@$version"
}

# Check if a directory has uncommitted changes (staged or unstaged)
has_uncommitted_changes() {
local dir="$1"
Expand Down Expand Up @@ -188,7 +197,7 @@ if [[ $cur_version != "$latest_version" ]]; then
cargo add "vfox@$VFOX_VERSION"

bump_and_publish_subcrate "aqua-registry" "crates/aqua-registry" "AQUA_REGISTRY_VERSION"
cargo add "aqua-registry@$AQUA_REGISTRY_VERSION"
use_published_aqua_registry "$AQUA_REGISTRY_VERSION"

# Copy schema into crate directory so cargo publish verification can find it
cp schema/mise.json crates/mise-interactive-config/mise.json
Expand Down
Loading