Script: fix update_hashes.sh

This commit is contained in:
Grégoire Henry 2018-07-19 00:12:11 +02:00
parent cff6c4beb1
commit 8b01c52529

View File

@ -29,7 +29,7 @@ then
find . -type f -exec sed "s/$current_hash_genesis/$new_hash_genesis/g" -i {} \; find . -type f -exec sed "s/$current_hash_genesis/$new_hash_genesis/g" -i {} \;
git commit -a -m "Update proto Genesis's hash" git commit -a -m "Update proto Genesis's hash"
else else
"Proto Genesis's hash hasn't changed, nothing to do" echo "Proto Genesis's hash hasn't changed, nothing to do"
fi fi
current_hash_alpha=`jq '.hash' < src/proto_alpha/lib_protocol/src/TEZOS_PROTOCOL | tr -d '"'` current_hash_alpha=`jq '.hash' < src/proto_alpha/lib_protocol/src/TEZOS_PROTOCOL | tr -d '"'`
@ -42,8 +42,8 @@ new_hash_alpha=`./tezos-protocol-compiler $alpha_tmpdir/tmp $alpha_tmpdir/src |
echo "Alpha's new hash: $new_hash_alpha" echo "Alpha's new hash: $new_hash_alpha"
if [ "$current_hash_alpha" != "$new_hash_alpha" ] if [ "$current_hash_alpha" != "$new_hash_alpha" ]
then then
find . -type f -exec sed "s/$current_hash_alpha/$new_hash_alpha/g" -i {} \; find src/proto_alpha src/bin_client docs -type f -exec sed "s/$current_hash_alpha/$new_hash_alpha/g" -i {} \;
git commit -a -m "Update proto Alpha's hash" git commit -a -m "Update proto Alpha's hash"
else else
"Proto Alpha's hash hasn't changed, nothing to do" echo "Proto Alpha's hash hasn't changed, nothing to do"
fi fi