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"
|
||||
echo "$grcontents" > .gitreview
|
||||
git add .gitreview
|
||||
git commit -s -m "Update .gitreview for $branch"
|
||||
git show
|
||||
if [[ -z $DRY_RUN ]]; then
|
||||
git review -t "create-${branch}"
|
||||
if ! git commit -s -m "Update .gitreview for $branch"; then
|
||||
if [[ -z $DRY_RUN ]]; then
|
||||
git review -t "create-${branch}"
|
||||
else
|
||||
echo "### skipping .gitreview submission to $branch"
|
||||
fi
|
||||
else
|
||||
echo "### skipping review submission to $branch"
|
||||
echo "### no changes required for .gitreview"
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user