From: SangYoun Kwak Date: Thu, 25 Jul 2024 09:00:13 +0000 (+0900) Subject: script: Modify retrieving 'Release' from TZ_BUILD_ID X-Git-Tag: accepted/tizen/unified/20240727.112800^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ecb2fbd79c64a97e1ac480e503a8b63a3e004894;p=platform%2Fcore%2Fapi%2Fsystem-info.git 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 --- 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/[-_.]*$//")