Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 0 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 4 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "codegen"
version = "0.1.0"
edition = "2024"
name = "codegen"
version = "0.1.0"
edition = "2024"
description = "Crate used to generate pages from the Rust source code of Biome"
publish = false
publish = false

[lib]
name = "codegen"
Expand Down Expand Up @@ -57,8 +57,6 @@ biome_string_case = { git = "https://github.com/biomejs/biome.git", rev = "1f308
biome_test_utils = { git = "https://github.com/biomejs/biome.git", rev = "1f30838b288bf317bf88c9247da029d9a394d009" }
biome_text_edit = { git = "https://github.com/biomejs/biome.git", rev = "1f30838b288bf317bf88c9247da029d9a394d009" }
bpaf = { version = "0.9.23", features = ["docgen"] }
# pin it because cargo keeps update it
ls-types = "=0.0.3"
# If you update this library, be aware of the breaking changes
camino = "1.2.2"
# Needed to fix some weird dependency
Expand Down
21 changes: 16 additions & 5 deletions scripts/update-revision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,21 @@ jq ".devDependencies[\"@biomejs/wasm-web\"] = \"https://pkg.pr.new/biomejs/biome
# Install dependencies
pnpm install --no-frozen-lockfile

# Update the rev values for the biome dependencies
awk -v new_rev="$new_rev" '{gsub(/rev = "[^"]+"/, "rev = \"" new_rev "\""); print}' Cargo.toml >temp.toml && mv temp.toml Cargo.toml

# Update Cargo.lock
cargo update
# Identify all top-level biome crates
biome_crates=$(
cargo tree --prefix none --depth 1 --format '{p}' \
| grep '^biome_' \
| awk '{print $1}'
)

# Update each biome crate to point to the new revision
if [ -n "$biome_crates" ]; then
# shellcheck disable=SC2086
set -- $biome_crates
cargo add \
--git https://github.com/biomejs/biome.git \
--rev "$new_rev" \
"$@"
fi

echo "Revision updated to $new_rev."
Loading