Keep tokio consistent with solana-program-test (#1157)

* Keep tokio consistent with solana-program-test

* Update update-solana-dependencies.sh

Co-authored-by: Michael Vines <mvines@gmail.com>

Co-authored-by: Michael Vines <mvines@gmail.com>
This commit is contained in:
Tyera Eulberg 2021-02-04 12:55:28 -07:00 committed by GitHub
parent 88cf08b4c1
commit f4e92fe50d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -26,6 +26,7 @@ cd "$(dirname "$0")"
source "$solana_dir"/scripts/read-cargo-variable.sh
solana_ver=$(readCargoVariable version "$solana_dir"/sdk/Cargo.toml)
tokio_ver=$(sed -n "s#^tokio.*version *= *\"\([^\"]*\).*#\1#p" "$solana_dir"/program-test/Cargo.toml)
echo "Patching in $solana_ver from $solana_dir"
echo
@ -56,5 +57,4 @@ PATCH
fi
done
./update-solana-dependencies.sh "$solana_ver"
./update-solana-dependencies.sh "$solana_ver" "$tokio_ver"

View File

@ -4,6 +4,7 @@
#
solana_ver=$1
tokio_ver=$2
if [[ -z $solana_ver ]]; then
echo "Usage: $0 <new-solana-version>"
exit 1
@ -36,4 +37,6 @@ set -x
for crate in "${crates[@]}"; do
sed -i -e "s#\(${crate} = \"\).*\(\"\)#\1$solana_ver\2#g" "${tomls[@]}"
done
if [[ -n $tokio_ver ]]; then
sed -i -e "s#\(tokio.*version *= *\"\)[^\"]*\(\".*$\)#\1$tokio_ver\2#g" "${tomls[@]}"
fi