Increment internal Cargo references to solana_program_interface

This commit is contained in:
Michael Vines
2018-10-25 10:38:34 -07:00
parent 7404b8739e
commit 9447537d8c
7 changed files with 23 additions and 12 deletions

View File

@ -53,12 +53,23 @@ esac
newVersion="$MAJOR.$MINOR.$PATCH"
for Cargo_toml in {,common/}Cargo.toml; do
# shellcheck disable=2044 # Disable 'For loops over find output are fragile...'
for Cargo_toml in $(find . -name Cargo.toml); do
# Bump crate version
(
set -x
sed -i $Cargo_toml -e "s/^version = \"$currentVersion\"$/version = \"$newVersion\"/"
sed -i "$Cargo_toml" -e "s/^version = \"[^\"]\"$/version = \"$newVersion\"/"
)
# Fix up the internal references to the solana_program_interface crate
(
set -x
sed -i "$Cargo_toml" -e "
s/^solana_program_interface.*\(\"[^\"]*common\"\).*\$/solana_program_interface = \{ path = \1, version = \"$newVersion\" \}/
"
)
done
echo "$currentVersion -> $newVersion"
exit 0