simon | 7a7b4d5 | 2022-09-23 02:09:42 -0400 | [diff] [blame] | 1 | #!/usr/bin/env sh |
simon | 7a7b4d5 | 2022-09-23 02:09:42 -0400 | [diff] [blame] | 2 | |
simon | 718f76c | 2022-11-07 20:55:01 -0500 | [diff] [blame] | 3 | confirm () { |
| 4 | if ! eval "$@" ; then |
| 5 | printf "Found some problems. Do you still want to push? [y/N] " |
| 6 | read -r REPLY |
| 7 | |
| 8 | if [ "$REPLY" = "${REPLY#[Yy]}" ] |
| 9 | then |
| 10 | echo "Cancelling push..." |
| 11 | exit 1 |
| 12 | fi |
| 13 | else |
| 14 | echo "OK!" |
| 15 | fi |
| 16 | } |
| 17 | |
| 18 | echo "Checking for i18next warnings..." |
| 19 | confirm "npm run extract-translations -w client -- --fail-on-warnings --fail-on-update" |
| 20 | |
| 21 | echo "Checking for eslint warnings..." |
| 22 | confirm "npm run lint --workspaces -- --max-warnings 0" |