forked from kemitix/git-next
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:
|
||||
#!/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"
|
||||
|
|
Loading…
Reference in a new issue