Script to publish to crates.io (#2093)

This commit is contained in:
Ignotus Peverell 2018-12-06 20:46:39 -08:00 committed by GitHub
parent 3fdfa0b607
commit 4573c0f1ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

31
etc/crate-release.sh Executable file
View file

@ -0,0 +1,31 @@
#!/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 config servers )
for crate in "${crates[@]}"
do
echo "** Publishing $crate"
cd $crate
cargo package
cargo pubish
cd ..
done
echo "Done."