Merge "Minor refactor."

This commit is contained in:
Treehugger Robot 2022-09-23 20:53:49 +00:00 committed by Gerrit Code Review
commit 255c1f0e9f

View file

@ -15,6 +15,17 @@ function revert_local_changes() {
if [[ $previousHash ]]; then git revert --no-commit $previousHash ; fi ;'
}
function commit_changes() {
repo forall -c '\
if [[ $(git status --short) ]]; then
repo start fina-step1 ;
git add -A . ;
git commit -m FINALIZATION_STEP_1_SCRIPT_COMMIT -m WILL_BE_AUTOMATICALLY_REVERTED ;
repo upload --cbr --no-verify -t -y . ;
git clean -fdx ; git reset --hard ;
fi'
}
function finalize_step_1_main() {
local top="$(dirname "$0")"/../..
@ -26,7 +37,7 @@ function finalize_step_1_main() {
source $top/build/make/finalize-aidl-vndk-sdk-resources.sh
# move all changes to fina-step1 branch and commit with a robot message
repo forall -c 'if [[ $(git status --short) ]]; then repo start fina-step1 ; git add -A . ; git commit -m FINALIZATION_STEP_1_SCRIPT_COMMIT -m WILL_BE_AUTOMATICALLY_REVERTED ; repo upload --cbr --no-verify -t -y . ; fi'
commit_changes
}
finalize_step_1_main