fix: 解决版本信息获取编译报错,兼容不同格式tag处理
This commit is contained in:
parent
58f2f2aa3e
commit
5881154ddc
4
build.sh
4
build.sh
@ -19,11 +19,11 @@ arm_version=`git log --decorate -1 | sed -n '1p' | awk '{print substr($2,0)}'`
|
|||||||
arm_build_date=`date +"%Y-%m-%d-%H:%M:%S"`
|
arm_build_date=`date +"%Y-%m-%d-%H:%M:%S"`
|
||||||
|
|
||||||
#判断tag是否存在
|
#判断tag是否存在
|
||||||
if [ -z `git log --decorate -1 | grep -oP '(?<=tag: ).*'` ]
|
if [ -z `git log --decorate -1 | grep -oP '(?<=tag: ).*' | awk '{print substr($1,0)}'` ]
|
||||||
then
|
then
|
||||||
arm_tag="NULL";
|
arm_tag="NULL";
|
||||||
else
|
else
|
||||||
arm_tag=`git log --decorate -1 | grep -oP '(?<=tag: ).*'`
|
arm_tag=`git log --decorate -1 | grep -oP '(?<=tag: ).*' | awk '{print substr($1,0)}'`
|
||||||
arm_tag=${arm_tag%?}
|
arm_tag=${arm_tag%?}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user