From 0c7a0602118f4873a185396f2da4d6e596143ad9 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 14 Jul 2024 10:40:47 +0100 Subject: [PATCH] build: add script to publish to crates.io --- justfile | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/justfile b/justfile index b64c557..de3ebfd 100644 --- a/justfile +++ b/justfile @@ -39,3 +39,15 @@ grcov-coverage: grcov . -s . --binary-path ./target/debug/ -t html --branch --ignore-not-existing -o ./target/debug/coverage/ find . -name '*.profraw' -exec rm "{}" \; echo "Now:\n\topen target/debug/coverage/index.html" + +publish version: + #!/usr/bin/bash -e + # [[ -z $(git status --short) ]] || echo "Worktree is Dirty - aborting" ; exit + echo "Clean" + # git co v{{version}} + ORDER=$(cargo publish-workspace --target-version {{version}} --crate-prefix git-next --show-order 2>/dev/null | cut -d\ -f2-) + # INFO: Why not use publish-workspace to publish? It doesn't support when crates-io registry is replaced + for P in ${ORDER} + do + cargo publish --registry crates-io -p $P + done