script: Modify retrieving 'Release' from TZ_BUILD_ID 25/315125/4 accepted/tizen/unified/20240727.112800 accepted/tizen/unified/x/20240729.014248
authorSangYoun Kwak <sy.kwak@samsung.com>
Thu, 25 Jul 2024 09:00:13 +0000 (18:00 +0900)
committerSangYoun Kwak <sy.kwak@samsung.com>
Fri, 26 Jul 2024 02:39:24 +0000 (11:39 +0900)
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 <sy.kwak@samsung.com>
script/make_info_file.sh

index 3288469e79e5a3897ba32ae966bf31432c23b25e..2617088790156aab113c466e1ec6dd1b33b119f3 100644 (file)
@@ -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/[-_.]*$//")