tools

various tools I have been using throughout the years
Log | Files | Refs | README | LICENSE

justfile (1528B)


      1 bazel := "bazelisk"
      2 cargo := "cargo"
      3 
      4 # Show this help message
      5 default:
      6     @just --list
      7 
      8 # Generate schema for `rust-analyzer`
      9 rust-gen-project:
     10     {{ bazel }} run @rules_rust//tools/rust_analyzer:gen_rust_project
     11 
     12 # Update `requirements.out` lockfile
     13 pip-update:
     14     {{ bazel }} run //:requirements.update
     15 
     16 # Update `Cargo.lock` lockfile
     17 cargo-lockfile:
     18     {{ cargo }} generate-lockfile
     19 
     20 # Check `bazel_dep` versions against BCR for updates
     21 bazel-dep-check:
     22     sh bazel/module-dep-check.sh
     23 
     24 # Run `cargo check` (using bazel clippy aspect)
     25 clippy +targets:
     26     {{ bazel }} build --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect {{ "//" + replace(targets, " ", " //") }}
     27 
     28 # Format with `rustfmt`
     29 rustfmt +targets:
     30     {{ bazel }} build --aspects=@rules_rust//rust:defs.bzl%rustfmt_aspect {{ "//" + replace(targets, " ", " //") }}
     31 
     32 # Run `bazel run //<target>`
     33 run +targets:
     34     @for target in {{ targets }}; do \
     35         {{ bazel }} run //"${target#//}"; \
     36     done
     37 
     38 # Run `bazel build //<target>`
     39 build +targets:
     40     {{ bazel }} build --bes_results_url=https://mtmn.buildbuddy.io/invocation/ --bes_backend=grpcs://mtmn.buildbuddy.io {{ "//" + replace(targets, " ", " //") }}
     41 
     42 # Run `bazel build //<target>:deploy`
     43 deploy +targets:
     44     @for target in {{ targets }}; do \
     45         {{ bazel }} run //"${target#//}:deploy"; \
     46     done
     47 
     48 # Run `bazel fetch //...`
     49 fetch:
     50     {{ bazel }} fetch //...
     51 
     52 # Run `bazel clean --expunge`
     53 clean:
     54     {{ bazel }} clean --expunge
     55 
     56 # Run `bazel mod tidy`
     57 tidy:
     58     {{ bazel }} mod tidy