-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
List endpoint and 2.0 refactors(#11)
- Loading branch information
Showing
16 changed files
with
1,061 additions
and
228 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
_print() { | ||
printf "\e[38;5;4m%s\e[0m\n" "$1" | ||
} | ||
|
||
main() { | ||
files_before_format=$(git diff --name-only --diff-filter=d) | ||
|
||
_print "Running pint..." | ||
vendor/bin/pint --dirty | ||
|
||
_print "Running rector..." | ||
vendor/bin/rector process --no-diffs | ||
|
||
files_after_format=$(git diff --name-only --diff-filter=d) | ||
|
||
# Find files fixed by pint by comparing file lists before and after pint run | ||
files_fixed_by_format=$(comm -13 <(sort <<<"$files_before_format") <(sort <<<"$files_after_format")) | ||
|
||
# Re-stage files fixed by pint | ||
_print "Re-staging changed files..." | ||
for f in $files_fixed_by_format; do git add "$f"; done || exit | ||
} | ||
|
||
main "$@" |
Oops, something went wrong.