Merge "Update scripts to reflect most recent state."
This commit is contained in:
commit
3b120bebce
6 changed files with 37 additions and 80 deletions
24
finalize-locally-mainline-sdk.sh
Executable file
24
finalize-locally-mainline-sdk.sh
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
function finalize_locally_mainline_sdk() {
|
||||
local MAINLINE_EXTENSION='6'
|
||||
|
||||
local top="$(dirname "$0")"/../..
|
||||
|
||||
# Bump SDK extension version.
|
||||
"$top/packages/modules/SdkExtensions/gen_sdk/bump_sdk.sh" ${MAINLINE_EXTENSION}
|
||||
|
||||
local version_defaults="$top/build/make/core/version_defaults.mk"
|
||||
sed -i -e "s/PLATFORM_SDK_EXTENSION_VERSION := .*/PLATFORM_SDK_EXTENSION_VERSION := ${MAINLINE_EXTENSION}/g" $version_defaults
|
||||
|
||||
# Build modules SDKs.
|
||||
TARGET_BUILD_VARIANT=userdebug UNBUNDLED_BUILD_SDKS_FROM_SOURCE=true "$top/vendor/google/build/mainline_modules_sdks.sh"
|
||||
|
||||
# Update prebuilts.
|
||||
"$top/packages/modules/common/tools/finalize_sdk.py" -l -b 0 -f ${MAINLINE_EXTENSION} -r '' 0
|
||||
}
|
||||
|
||||
finalize_locally_mainline_sdk
|
||||
|
|
@ -14,7 +14,7 @@ function finalize_sdk_rel() {
|
|||
|
||||
# adb keys
|
||||
$m adb
|
||||
LOGNAME=android-eng HOSTNAME=google.com adb keygen "$DEV_SRC_DIR/vendor/google/security/adb/${PLATFORM_VERSION}.adb_key"
|
||||
LOGNAME=android-eng HOSTNAME=google.com "$DEV_SRC_DIR/out/host/linux-x86/bin/adb" keygen "$DEV_SRC_DIR/vendor/google/security/adb/${PLATFORM_VERSION}.adb_key"
|
||||
|
||||
# build/make/core/version_defaults.mk
|
||||
sed -i -e "s/PLATFORM_VERSION_CODENAME.${BUILD_PREFIX} := .*/PLATFORM_VERSION_CODENAME.${BUILD_PREFIX} := REL/g" "$DEV_SRC_DIR/build/make/core/version_defaults.mk"
|
||||
|
@ -29,13 +29,13 @@ function finalize_sdk_rel() {
|
|||
cp -r "$DEV_SRC_DIR/system/sepolicy/private/" "$DEV_SRC_DIR/system/sepolicy/prebuilts/api/${PLATFORM_SDK_VERSION}.0/"
|
||||
|
||||
# prebuilts/abi-dumps/ndk
|
||||
git -C "$DEV_SRC_DIR/prebuilts/abi-dumps/ndk" mv current ${PLATFORM_SDK_VERSION}
|
||||
mv "$DEV_SRC_DIR/prebuilts/abi-dumps/ndk/current" "$DEV_SRC_DIR/prebuilts/abi-dumps/ndk/$PLATFORM_SDK_VERSION"
|
||||
|
||||
# prebuilts/abi-dumps/vndk
|
||||
git -C "$DEV_SRC_DIR/prebuilts/abi-dumps/vndk" mv ${PLATFORM_CODENAME} ${PLATFORM_SDK_VERSION}
|
||||
mv "$DEV_SRC_DIR/prebuilts/abi-dumps/vndk/$PLATFORM_CODENAME" "$DEV_SRC_DIR/prebuilts/abi-dumps/vndk/$PLATFORM_SDK_VERSION"
|
||||
|
||||
# prebuilts/abi-dumps/platform
|
||||
git -C "$DEV_SRC_DIR/prebuilts/abi-dumps/platform" mv current ${PLATFORM_SDK_VERSION}
|
||||
mv "$DEV_SRC_DIR/prebuilts/abi-dumps/platform/current" "$DEV_SRC_DIR/prebuilts/abi-dumps/platform/$PLATFORM_SDK_VERSION"
|
||||
}
|
||||
|
||||
finalize_sdk_rel
|
||||
|
|
|
@ -4,49 +4,10 @@
|
|||
|
||||
set -ex
|
||||
|
||||
function revert_to_unfinalized_state() {
|
||||
declare -a projects=(
|
||||
"build/make/"
|
||||
"build/soong/"
|
||||
"cts/"
|
||||
"frameworks/base/"
|
||||
"frameworks/hardware/interfaces/"
|
||||
"frameworks/libs/modules-utils/"
|
||||
"frameworks/libs/net/"
|
||||
"hardware/interfaces/"
|
||||
"libcore/"
|
||||
"packages/services/Car/"
|
||||
"platform_testing/"
|
||||
"prebuilts/abi-dumps/ndk/"
|
||||
"prebuilts/abi-dumps/platform/"
|
||||
"prebuilts/abi-dumps/vndk/"
|
||||
"system/hardware/interfaces/"
|
||||
"system/tools/aidl/"
|
||||
"tools/platform-compat"
|
||||
"device/generic/car"
|
||||
"development"
|
||||
)
|
||||
|
||||
for project in "${projects[@]}"
|
||||
do
|
||||
local git_path="$top/$project"
|
||||
echo "Reverting: $git_path"
|
||||
baselineHash="$(git -C $git_path log --format=%H --no-merges --max-count=1 --grep ^FINALIZATION_STEP_1_BASELINE_COMMIT)" ;
|
||||
if [[ $baselineHash ]]; then
|
||||
previousHash="$(git -C $git_path log --format=%H --no-merges --max-count=100 --grep ^FINALIZATION_STEP_1_SCRIPT_COMMIT $baselineHash..HEAD | tr \n \040)" ;
|
||||
else
|
||||
previousHash="$(git -C $git_path log --format=%H --no-merges --max-count=100 --grep ^FINALIZATION_STEP_1_SCRIPT_COMMIT | tr \n \040)" ;
|
||||
fi ;
|
||||
if [[ $previousHash ]]; then git -C $git_path revert --no-commit --strategy=ort --strategy-option=ours $previousHash ; fi ;
|
||||
done
|
||||
}
|
||||
|
||||
function finalize_step_1_main() {
|
||||
local top="$(dirname "$0")"/../..
|
||||
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
|
||||
|
||||
revert_to_unfinalized_state
|
||||
|
||||
# vndk etc finalization
|
||||
source $top/build/make/finalize-aidl-vndk-sdk-resources.sh
|
||||
|
||||
|
|
|
@ -32,6 +32,9 @@ function commit_changes() {
|
|||
}
|
||||
|
||||
function finalize_step_1_main() {
|
||||
# deprecated, do not use
|
||||
exit 1
|
||||
|
||||
local top="$(dirname "$0")"/../..
|
||||
|
||||
repo selfupdate
|
||||
|
|
|
@ -4,43 +4,6 @@
|
|||
|
||||
set -ex
|
||||
|
||||
function revert_to_unfinalized_state() {
|
||||
declare -a projects=(
|
||||
"build/make/"
|
||||
"build/soong/"
|
||||
"cts/"
|
||||
"frameworks/base/"
|
||||
"frameworks/hardware/interfaces/"
|
||||
"frameworks/libs/modules-utils/"
|
||||
"frameworks/libs/net/"
|
||||
"hardware/interfaces/"
|
||||
"libcore/"
|
||||
"packages/services/Car/"
|
||||
"platform_testing/"
|
||||
"prebuilts/abi-dumps/ndk/"
|
||||
"prebuilts/abi-dumps/platform/"
|
||||
"prebuilts/abi-dumps/vndk/"
|
||||
"system/hardware/interfaces/"
|
||||
"system/tools/aidl/"
|
||||
"tools/platform-compat"
|
||||
"device/generic/car"
|
||||
"development"
|
||||
)
|
||||
|
||||
for project in "${projects[@]}"
|
||||
do
|
||||
local git_path="$top/$project"
|
||||
echo "Reverting: $git_path"
|
||||
baselineHash="$(git -C $git_path log --format=%H --no-merges --max-count=1 --grep ^FINALIZATION_STEP_1_BASELINE_COMMIT)" ;
|
||||
if [[ $baselineHash ]]; then
|
||||
previousHash="$(git -C $git_path log --format=%H --no-merges --max-count=100 --grep ^FINALIZATION_STEP_1_SCRIPT_COMMIT $baselineHash..HEAD | tr \n \040)" ;
|
||||
else
|
||||
previousHash="$(git -C $git_path log --format=%H --no-merges --max-count=100 --grep ^FINALIZATION_STEP_1_SCRIPT_COMMIT | tr \n \040)" ;
|
||||
fi ;
|
||||
if [[ $previousHash ]]; then git -C $git_path revert --no-commit --strategy=ort --strategy-option=ours $previousHash ; fi ;
|
||||
done
|
||||
}
|
||||
|
||||
function finalize_step_2_main() {
|
||||
local top="$(dirname "$0")"/../..
|
||||
local m="$top/build/soong/soong_ui.bash --make-mode TARGET_PRODUCT=aosp_arm64 TARGET_BUILD_VARIANT=userdebug"
|
||||
|
@ -53,6 +16,9 @@ function finalize_step_2_main() {
|
|||
# prebuilts etc
|
||||
source $top/build/make/finalize-sdk-rel.sh
|
||||
|
||||
# mainline sdk prebuilts
|
||||
source $top/build/make/finalize-locally-mainline-sdk.sh
|
||||
|
||||
# build to confirm everything is OK
|
||||
AIDL_FROZEN_REL=true $m
|
||||
}
|
||||
|
|
|
@ -32,6 +32,9 @@ function commit_changes() {
|
|||
}
|
||||
|
||||
function finalize_step_2_main() {
|
||||
# deprecated, do not use
|
||||
exit 1
|
||||
|
||||
local top="$(dirname "$0")"/../..
|
||||
|
||||
repo selfupdate
|
||||
|
|
Loading…
Reference in a new issue