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
#!/bin/bash | |
# This will automatically run npm audit fix on your branch and commit the changes with a commit message that includes the current branch name | |
# It will not run on develop or master branches | |
# You can skip it on other branches with the --no-verify command line option: git push origin branch --no-verify | |
BRANCH=`git rev-parse --abbrev-ref HEAD` | |
MESSAGE="$BRANCH npm audit fix" | |
if [[ $BRANCH = 'master' ]] || [[ $BRANCH = 'develop' ]] ; then | |
echo 'skipping audit on '$BRANCH' branch' | |
exit 0 |