Skip to content

Commit

Permalink
Add swc update script
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed May 7, 2024
1 parent 389da7b commit 63369f2
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions scripts/swc-update-all.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/usr/bin/env bash

# This bumps all swc crates in Cargo.lock to the latest version.
# Before, update the swc_core version range in all Cargo.tomls to the latest version.

set -eu

echo "Listing all swc crates"

swc_crates=$(cargo metadata --format-version=1 --all-features | jq '.packages .[] | select(.repository == "https://github.com/swc-project/swc.git" or .repository == "https://github.com/swc-project/plugins.git") | .name' -r)

command="cargo update"
for crate in $swc_crates; do
command="$command -p $crate"
done

echo "Running: $command"
eval $command

0 comments on commit 63369f2

Please sign in to comment.