Update publish_crates.sh
to allow custom uploading of crates
#!/usr/bin/env bash
-infrastructure_packages=('tari_util' 'derive' 'crypto' 'merklemountainrange')
-base_layer_packages=('core')
+packages=${@:-'infrastructure/tari_util infrastructure/derive infrastructure/crypto infrastructure/merklemountainrange base_layer/core'}
+p_arr=($packages)
function build_package {
- path=$1
- shift
list=($@)
for p in "${list[@]}"; do
echo "************************ Building $path/$p package ************************"
- cargo publish --manifest-path=${path}/${p}/Cargo.toml
+ cargo publish --manifest-path=./${p}/Cargo.toml
done
echo "************************ $path packages built ************************"
@@ -16,5 +14,4 @@ function build_package {
# You need a token with write access to publish these crates
cargo login
-build_package "infrastructure" ${infrastructure_packages[@]}
-build_package "base_layer" ${base_layer_packages[@]}
+build_package ${p_arr[@]}
