Skip .gitreview review when unnecessary
This allows the process to run more than once in a given repo without erroring on the already-patched .gitreview checkout. Change-Id: Iebdf64c87d0ec497b16ce66c48c0c5e4dee5554e Signed-off-by: Dean Troyer <dtroyer@gmail.com>
This commit is contained in:
parent
a57fa7a1b8
commit
2f6fa5e4e2
@ -57,12 +57,14 @@ function update_gitreview {
|
|||||||
defaultbranch=$branch"
|
defaultbranch=$branch"
|
||||||
echo "$grcontents" > .gitreview
|
echo "$grcontents" > .gitreview
|
||||||
git add .gitreview
|
git add .gitreview
|
||||||
git commit -s -m "Update .gitreview for $branch"
|
if ! git commit -s -m "Update .gitreview for $branch"; then
|
||||||
git show
|
|
||||||
if [[ -z $DRY_RUN ]]; then
|
if [[ -z $DRY_RUN ]]; then
|
||||||
git review -t "create-${branch}"
|
git review -t "create-${branch}"
|
||||||
else
|
else
|
||||||
echo "### skipping review submission to $branch"
|
echo "### skipping .gitreview submission to $branch"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "### no changes required for .gitreview"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user