diff --git a/justfile b/justfile index ca84c0e..29e1182 100644 --- a/justfile +++ b/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"