获取版本信息准则修改:获取最新commitID;若存在tag,获取tag信息;若不存在tag,tag为NULL
This commit is contained in:
parent
f90410f55c
commit
c982b32734
12
build.sh
12
build.sh
@ -27,10 +27,18 @@ test_option="no"
|
|||||||
case_id=21
|
case_id=21
|
||||||
ape_core_mask=0xf
|
ape_core_mask=0xf
|
||||||
platform_build_data=0x20230926
|
platform_build_data=0x20230926
|
||||||
spu_version=`git log -1 --format="%H"`
|
spu_version=`git log --decorate -1 | sed -n '1p' | awk '{print substr($2,0)}'`
|
||||||
spu_tag=`git tag | sed -n '$p'`
|
|
||||||
spu_build_date=`date +"%Y-%m-%d-%H:%M:%S"`
|
spu_build_date=`date +"%Y-%m-%d-%H:%M:%S"`
|
||||||
|
|
||||||
|
#判断tag是否存在
|
||||||
|
if [ -z `git log --decorate -1 | grep -oP '(?<=tag: ).*'` ]
|
||||||
|
then
|
||||||
|
spu_tag="NULL";
|
||||||
|
else
|
||||||
|
spu_tag=`git log --decorate -1 | grep -oP '(?<=tag: ).*'`
|
||||||
|
spu_tag=${spu_tag%?}
|
||||||
|
fi
|
||||||
|
|
||||||
while [[ "$#" > 0 ]]; do
|
while [[ "$#" > 0 ]]; do
|
||||||
case $1 in
|
case $1 in
|
||||||
--debug) debug_option="yes"; shift;;
|
--debug) debug_option="yes"; shift;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user