summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill McVicker <willmcvicker@google.com>2024-02-12 11:49:18 -0800
committerWill McVicker <willmcvicker@google.com>2024-02-12 11:50:44 -0800
commit321316d2eeefb5bb68632e336768a80d0fed2c03 (patch)
treebf2d0f962ad7cc53339b7e42f336627bd0f5cc2b
parent394d2493c76041933ffa0677bcadba7be2dab306 (diff)
downloadgs-321316d2eeefb5bb68632e336768a80d0fed2c03.tar.gz
build_slider.sh: update the SPL for development
The SPL in the platform build is being updated more frequently than originally anticipated (previously it was updated quarterly in the trunk_staging builds). Now the trunk staging SPL follows the monthly SPL. To accomidate this, this patch updates the development build's SPL to pick the QPR date after the next QPR, e.g. Nov 2023 builds would pick March 2024. Note, as a reminder, this is for development purposes only and the Android platform build will override this SPL. Tested: verified the SPL is set to '2024-06-05' with this patch Bug: 274825778 Signed-off-by: Will McVicker <willmcvicker@google.com> Change-Id: Ifb815a285baf9f633c03e122dfd126e653882ec7
-rwxr-xr-xbuild_slider.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/build_slider.sh b/build_slider.sh
index 7e67eca8a118..55089c110aa7 100755
--- a/build_slider.sh
+++ b/build_slider.sh
@@ -10,14 +10,21 @@ function exit_if_error {
function add_boot_hash_footer {
eval `grep "\<BUILD_GKI_BOOT_IMG_LZ4_SIZE=" aosp/build.config.gki.aarch64`
- local spl_month=$(date +'%m')
+ local spl_month=$((($(date +'%m') + 3) % 12))
+ local spl_year="$(date +'%Y')"
if [ $((${spl_month} % 3)) -gt 0 ]; then
- # Round up to the closest quarterly month
+ # Round up to the next quarterly platform release (QPR) month
spl_month=$((${spl_month} + 3 - (${spl_month} % 3)))
fi
+ if [ "${spl_month}" -lt "$(date +'%m')" ]; then
+ # rollover to the next year
+ spl_year="$((${spl_year} + 1))"
+ fi
+ local spl_date=$(printf "%d-%02d-05\n" ${spl_year} ${spl_month})
+
local additional_props=""
- if [ -n "${spl_month}" ]; then
- additional_props="--prop com.android.build.boot.security_patch:$(date +'%Y')-${spl_month}-05"
+ if [ -n "${spl_date}" ]; then
+ additional_props="--prop com.android.build.boot.security_patch:${spl_date}"
fi
build/kernel/build-tools/path/linux-x86/avbtool add_hash_footer \