Files
redux-scraper/justfile
2024-12-18 18:51:07 +00:00

15 lines
414 B
Makefile

default:
@just --list
[private]
changed-ruby-files:
@git diff --name-only | \
(grep -v 'db/schema.rb' || true) | \
(grep -E '(\.(rb|rake|erb)|Rakefile)$' || true)
format-changed:
just changed-ruby-files | xargs -I{} bash -c "stree format {} > {}.tmp && mv {}.tmp {}"
format-all:
find . -name '*.rb' -type f -exec sh -c 'stree format "$1" > "$1.tmp" && mv "$1.tmp" "$1"' sh {} \;