Tidy up the top-level directory by moving misc. scripts into a subdirectory.

This commit is contained in:
Dan Gohman
2019-11-08 09:47:31 -08:00
parent a40e3b734a
commit fff777d4c3
4 changed files with 2 additions and 2 deletions

24
scripts/cranelift-version.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
set -euo pipefail
# This is a convenience script for maintainers changing a cranelift
# dependencies versions. To use, bump the version number below, run the
# script.
topdir=$(dirname "$0")
cd "$topdir"
# All the cranelift-* crates have the same version number
version="0.49"
# Update all of the Cargo.toml files.
echo "Updating crate versions to $version"
for crate in . crates/* crates/misc/* fuzz; do
# Update the version number of this crate to $version.
sed -i.bk -e "/^cranelift-/s/\"[^\"]*\"/\"$version\"/" \
"$crate/Cargo.toml"
# Update the required version number of any cranelift* dependencies.
sed -i.bk -e "/^cranelift-/s/version = \"[^\"]*\"/version = \"$version\"/" \
"$crate/Cargo.toml"
done