build: add script to publish to crates.io

This commit is contained in:
Paul Campbell 2024-07-14 10:40:47 +01:00
parent e410cfc4f1
commit 0c7a060211

View file

@ -39,3 +39,15 @@ grcov-coverage:
grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/
find . -name '*.profraw' -exec rm "{}" \;
echo "Now:\n\topen target/debug/coverage/index.html"
publish version:
#!/usr/bin/bash -e
# [[ -z $(git status --short) ]] || echo "Worktree is Dirty - aborting" ; exit
echo "Clean"
# git co v{{version}}
ORDER=$(cargo publish-workspace --target-version {{version}} --crate-prefix git-next --show-order 2>/dev/null | cut -d\ -f2-)
# INFO: Why not use publish-workspace to publish? It doesn't support when crates-io registry is replaced
for P in ${ORDER}
do
cargo publish --registry crates-io -p $P
done