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