chore: update create publishing command
All checks were successful
Rust / build (push) Successful in 2m3s
ci/woodpecker/push/cron-docker-builder Pipeline was successful
ci/woodpecker/push/push-next Pipeline was successful
ci/woodpecker/push/tag-created Pipeline was successful

This commit is contained in:
Paul Campbell 2024-07-29 06:57:52 +01:00
parent b7abe949e2
commit bf12712bca

View file

@ -42,12 +42,21 @@ grcov-coverage:
publish version:
#!/usr/bin/bash -e
[[ -z $(git status --short) ]] || echo "Worktree is Dirty - aborting" ; exit
echo "Clean"
echo "Publishing git-next v{{version}} to crates.io..."
if [ -z $(git status --short) ]; then
echo "Worktree is clean - proceeding"
else
echo "Worktree is Dirty - aborting" ; exit
fi
git co v{{version}}
ORDER=$(cargo publish-workspace --target-version {{version}} --crate-prefix git-next --show-order 2>/dev/null | cut -d\ -f2-)
echo "Publishing crates in order: ${ORDER}"
# INFO: Why not use publish-workspace to publish? It doesn't support when crates-io registry is replaced
for P in ${ORDER}
do
echo "Publishing ${P}..."
cargo publish --registry crates-io -p $P
echo "Done: ${P}"
echo "======================================"
done
echo "All crates published"