grin/etc/crate-release.sh

35 lines
695 B
Bash
Raw Normal View History

2018-12-07 07:46:39 +03:00
#!/usr/bin/env bash
# check we're in the grin root
if [ ! -f "LICENSE" ] ; then
echo "Script must be run from Grin's root directory"
exit 1
fi
echo "Going to package and publish each crate, if you're not logged in crates.io (missing ~/.cargo/credentials, this will fail."
echo "Also check that rust-secp256k1-zkp has been published with the latest version. "
read -p "Continue? " -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
printf "\nbye\n"
exit 1
fi
echo
crates=( util keychain core store chain pool p2p api wallet servers config )
2018-12-07 07:46:39 +03:00
for crate in "${crates[@]}"
do
echo "** Publishing $crate"
cd $crate
cargo package
2018-12-07 20:34:33 +03:00
cargo publish
2018-12-07 07:46:39 +03:00
cd ..
done
cargo package
cargo publish
2018-12-07 07:46:39 +03:00
echo "Done."