don't spend hours testing things with WIP in the title

So this is very easy, the problem is determining if the user
actually intended to mark their commit as a work in progress
for no testing, or if the user has WIP in their commit title
for some other reason. To help with that WIP or wip has to
be at the start of the commit message and have a trailing space.
Maybe : should also be accepted as a trailing char.

Change-Id: Ic44114dbf50abbe2a9f135a41257208fe7feddf8
This commit is contained in:
jkilpatr 2017-09-27 12:30:59 -04:00 committed by Justin Kilpatrick
parent 5b45ce3b40
commit dfdcda149e
1 changed files with 10 additions and 0 deletions

View File

@ -1,6 +1,16 @@
#!/bin/bash
set -eu
if [[ $GERRIT_CHANGE_SUBJECT == "WIP "* ]] || [[ $GERRIT_CHANGE_SUBJECT == "wip "* ]]; then
echo "Commit is a work in progress, short circuiting"
exit 1
fi
if [[ $GERRIT_CHANGE_SUBJECT == "WIP: "* ]] || [[ $GERRIT_CHANGE_SUBJECT == "wip: "* ]]; then
echo "Commit is a work in progress, short circuiting"
exit 1
fi
pushd $WORKSPACE/tripleo-quickstart
sed -i.bak '/extras/d' $WORKSPACE/tripleo-quickstart/quickstart-extras-requirements.txt
echo "file://$WORKSPACE/tripleo-quickstart-extras/#egg=tripleo-quickstart-extras" >> $WORKSPACE/tripleo-quickstart/quickstart-extras-requirements.txt