From ecb2fbd79c64a97e1ac480e503a8b63a3e004894 Mon Sep 17 00:00:00 2001 From: SangYoun Kwak Date: Thu, 25 Jul 2024 18:00:13 +0900 Subject: [PATCH] script: Modify retrieving 'Release' from TZ_BUILD_ID Previously, script tries to retrieve 'Release' information from TZ_BUILD_ID by using the 'DATE'(which is from TZ_BUILD_DATE). But the 'DATE' and date info in TZ_BUILD_ID can be different, so the 'Release' can be invalid. To solve this issue, script is modified to retrieved 'Release' from TZ_BUILD_ID alone. It can get 'Release' information in format: {date in 8 decimal numbers} + "." + {various length of decimal numbers} Change-Id: I5130f8881f84f203e06799e2762b547c472ead20 Signed-off-by: SangYoun Kwak --- script/make_info_file.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/script/make_info_file.sh b/script/make_info_file.sh index 3288469..2617088 100644 --- a/script/make_info_file.sh +++ b/script/make_info_file.sh @@ -10,8 +10,7 @@ TYPE=$(echo $TZ_BUILD_RELEASE_TYPE | tr '[:upper:]' '[:lower:]') DATE=$(echo $TZ_BUILD_DATE | awk -F"[-_.]" '{ print $1 }') -RELEASE=$(echo $TZ_BUILD_ID | sed "s/.*$DATE/$DATE/") -RELEASE=$(echo $RELEASE | awk -F"[-_]" '{ print $1 }') +RELEASE=$(echo $TZ_BUILD_ID | sed -n 's@.*\([0-9]\{8\}\.[0-9]\+\).*@\1@p') ID=$(echo $TZ_BUILD_ID | sed "s/$DATE.*//") ID=$(echo $ID | sed "s/[-_.]*$//") -- 2.7.4