Browse Source

break docs generate commands into smaller pieces

master
Jonathan Strong 2 years ago
parent
commit
7c802f2609
  1. 26
      justfile

26
justfile

@ -30,7 +30,7 @@ generate-readme:
just debug-build just debug-build
./target/debug/registry-backup --help > doc/cli-menu.txt ./target/debug/registry-backup --help > doc/cli-menu.txt
just --list > doc/just-commands.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 # check, run tests, check non-error output for clippy, run rustfmt
pre-release: pre-release:
@ -44,19 +44,27 @@ verify-clean-git:
test "$(echo `git status --porcelain` | wc -c)" -eq "1" test "$(echo `git status --porcelain` | wc -c)" -eq "1"
get-crate-version: 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 # re-generate README.md and overwrite existing file with output
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
update-readme: verify-clean-git 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 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' 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 release: release-prep
git tag "v$(just get-crate-version)" git tag "v$(just get-crate-version)"
git push && git push --tags git push && git push --tags

Loading…
Cancel
Save