1#!/bin/bash 2# Script to perform a 1st step of Android Finalization: API/SDK finalization, update CLs and upload to Gerrit. 3 4# WIP, does not work yet 5exit 10 6 7set -ex 8 9function update_step_1_changes() { 10 set +e 11 repo forall -c '\ 12 if [[ $(git status --short) ]]; then 13 git stash -u ; 14 repo start "$FINAL_PLATFORM_CODENAME-SDK-Finalization" ; 15 git stash pop ; 16 git add -A . ; 17 git commit --amend --no-edit ; 18 repo upload --cbr --no-verify -o nokeycheck -t -y . ; 19 fi' 20} 21 22function update_step_1_main() { 23 local top="$(dirname "$0")"/../../../.. 24 source $top/build/make/tools/finalization/environment.sh 25 26 27 local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug" 28 29 # vndk etc finalization 30 source $top/build/make/tools/finalization/finalize-aidl-vndk-sdk-resources.sh 31 32 # update existing CLs and upload to gerrit 33 update_step_1_changes 34 35 # build to confirm everything is OK 36 AIDL_FROZEN_REL=true $m 37} 38 39update_step_1_main 40