Skip to content

Commit

Permalink
Add more commands to Justfile
Browse files Browse the repository at this point in the history
  • Loading branch information
akubera committed Dec 8, 2024
1 parent 477947b commit f95e2d2
Showing 1 changed file with 25 additions and 2 deletions.
27 changes: 25 additions & 2 deletions Justfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@

SED := `command -v gsed || command -v sed`

help:
@just --list

# git tasks to start next development version
prepare-dev-version v:
git checkout trunk
gsed -zE -i 's/(name = "bigdecimal"\nversion )= [^\n]*/\1= "{{v}}+dev"/' Cargo.toml Cargo.lock
{{SED}} -zE -i 's/(name = "bigdecimal"\nversion )= [^\n]*/\1= "{{v}}+dev"/' Cargo.toml Cargo.lock
git add Cargo.toml Cargo.lock
git commit -m 'Begin v{{v}} development'

Expand All @@ -11,10 +16,28 @@ prepare-dev-version v:
prepare-release v:
git checkout trunk
cargo clippy
gsed -zE -i 's/(name = "bigdecimal"\nversion )= [^\n]*/\1= "{{v}}"/' Cargo.toml Cargo.lock
{{SED}} -zE -i 's/(name = "bigdecimal"\nversion )= [^\n]*/\1= "{{v}}"/' Cargo.toml Cargo.lock
git add Cargo.toml Cargo.lock
git commit -m 'Version {{v}}'
git checkout master
git merge trunk --no-ff -m 'v{{v}}'
# git tag 'v{{v}}'

# enable and run benchmarks
benchmark *args:
scripts/benchmark-bigdecimal {{args}}

# enable and run property-tests
run-property-tests:
scripts/bigdecimal-property-tests test


# enable property test dependencies
enable-property-tests:
scripts/bigdecimal-property-tests enable


# print decimals with various formatting rules
run-formatting-example:
cargo run --example formatting-examples

0 comments on commit f95e2d2

Please # to comment.