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