#!/bin/sh # Called by "git commit" with no arguments. The hook should # exit with non-zero status after issuing an appropriate message if # it wants to stop the commit. # Invoke the "rush prettier" custom command to reformat files whenever they # are committed. The command is defined in common/config/rush/command-line.json # and uses the "rush-prettier" autoinstaller. cd source node common/scripts/install-run-rush.js add-license-header|| exit $? node common/scripts/install-run-rush.js prettier || exit $? if [ "$RUN_HOOKS" == true ]; then node common/scripts/install-run-rush.js git-secrets-scan || exit $? node common/scripts/install-run-rush.js lint:fix || exit $? node common/scripts/install-run-rush.js sort-package-json && git add **/package.json || exit $? if ! node common/scripts/install-run-rush.js build:test; then echo "\033[0;31mA Failure was encountered, please check the output above\033[0m" exit 1 fi node common/scripts/install-run-rush.js common-coverage-make-badge fi