Skip to content

Commit

Permalink
Improve justfile
Browse files Browse the repository at this point in the history
  • Loading branch information
chevdor committed Aug 30, 2022
1 parent b0b54db commit bdc0f3d
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,25 @@
VERSION := `toml get cli/Cargo.toml package.version | jq -r`

_default:
just --list
just --choose --chooser "fzf +s -x --tac --cycle"

# Show the list of tasks
help:
just --list

# Before releasing, this helps bumping up the version numbers
bump level:
cargo workspaces version {{level}} --no-individual-tags

# Clippy
_clippy:
cargo +nightly clippy --all-features --all-targets

# Rust fmt
_fmt:
cargo +nightly fmt --all -- --check

# Fmt + clippy
check: _fmt _clippy

# This will generate the usage instruction
Expand All @@ -28,9 +35,18 @@ tag:
@echo Tagging v{{VERSION}}
git tag -f v{{VERSION}}

# Create and push a tag matching the current version
tag_push: tag
git push origin v{{VERSION}}

# Converts our AsciiDoc documentation to Markdown
md:
#!/usr/bin/env bash
asciidoctor -b docbook -a leveloffset=+1 -o - README_src.adoc | pandoc --markdown-headings=atx --wrap=preserve -t markdown_strict -f docbook - > README.md
# Generate the doc: usage + md
doc: usage md

# Run the tests using nextest
test:
cargo nextest --no-fail-fast

0 comments on commit bdc0f3d

Please sign in to comment.