chore: update create publishing command
This commit is contained in:
parent
b7abe949e2
commit
bf12712bca
1 changed files with 11 additions and 2 deletions
13
justfile
13
justfile
|
@ -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"
|
||||||
|
|
Loading…
Reference in a new issue