From 7c802f26093fe27e2c07dc065c2cc8c91d9a7d95 Mon Sep 17 00:00:00 2001 From: Jonathan Strong Date: Thu, 8 Sep 2022 22:43:01 -0400 Subject: [PATCH] break docs generate commands into smaller pieces --- justfile | 26 +++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/justfile b/justfile index 7e5517f..971cbfb 100644 --- a/justfile +++ b/justfile @@ -30,7 +30,7 @@ generate-readme: just debug-build ./target/debug/registry-backup --help > doc/cli-menu.txt just --list > doc/just-commands.txt - just cargo run --bin generate-readme --features docs > README.md + just cargo run --bin generate-readme --features docs # check, run tests, check non-error output for clippy, run rustfmt pre-release: @@ -44,19 +44,27 @@ verify-clean-git: test "$(echo `git status --porcelain` | wc -c)" -eq "1" get-crate-version: - cat Cargo.toml | rg '^version =' | tr -d "version = " | tr -d '"' + @cat Cargo.toml | rg '^version =' | tr -d "version = " | tr -d '"' -release-prep: verify-clean-git pre-release - VERSION=$(just get-crate-version) \ - && test -z "$(git tag | rg \"v${VERSION}\")" # Error: tag appears to exist already - just update-readme - -# re-generate README.md and commit changes +# re-generate README.md and overwrite existing file with output update-readme: verify-clean-git - just generate-readme + just generate-readme > README.md + +# re-generate, overwrite, and stage changes +update-readme-and-stage: update-readme git add README.md doc/*.txt + +# re-generate, overwrite, stage, and commit +update-readme-and-commit: update-readme-and-stage git commit -m 're-generate docs' +# get everything all ready for release +release-prep: verify-clean-git pre-release + VERSION=$(just get-crate-version) \ + && test -z "$(git tag | rg \"v${VERSION}\")" # Error: tag appears to exist already + just update-readme-and-commit + +# release version (regenerate docs, git tag v0.0.0) release: release-prep git tag "v$(just get-crate-version)" git push && git push --tags