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