blob: 5b462138b4b16ed13cbbdc4e05edec991ab2b9cf [file] [log] [blame]
simon7a7b4d52022-09-23 02:09:42 -04001#!/usr/bin/env sh
simon7a7b4d52022-09-23 02:09:42 -04002
simon718f76c2022-11-07 20:55:01 -05003confirm () {
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
18echo "Checking for i18next warnings..."
19confirm "npm run extract-translations -w client -- --fail-on-warnings --fail-on-update"
20
21echo "Checking for eslint warnings..."
22confirm "npm run lint --workspaces -- --max-warnings 0"