Prepend the skip-line to the first line

This commit is contained in:
Matthias Beyer 2018-01-04 11:25:05 +01:00
parent db33d46608
commit 806e706087

View file

@ -19,7 +19,7 @@ if grep -q -i -e "WIP" -e "work in progress" $1; then
read -p "You're about to add a WIP commit, do you want to run the CI? [y|n] " -n 1 -r < /dev/tty
echo
if echo $REPLY | grep -E '^[Nn]$' > /dev/null; then
echo "[skip ci]" >> $1
sed -i '1,1s,.*,[ci skip] &,' $1
fi
fi