ci: Count build_example jobs in decimal instead of octal

This commit is contained in:
Anton Maklakov
2018-11-01 10:41:45 +08:00
parent a4357aed91
commit 124919bfc6
2 changed files with 4 additions and 2 deletions

View File

@@ -75,7 +75,8 @@ else
[ -z ${JOB_PATTERN} ] && die "JOB_PATTERN is bad" [ -z ${JOB_PATTERN} ] && die "JOB_PATTERN is bad"
# parse number 'NUM' at the end of string 'some_your_text_NUM' # parse number 'NUM' at the end of string 'some_your_text_NUM'
JOB_NUM=$( echo ${JOB_NAME} | sed -n -r 's/^.*_([0-9]+)$/\1/p' ) # NOTE: Getting rid of the leading zero to get the decimal
JOB_NUM=$( echo ${JOB_NAME} | sed -n -r 's/^.*_0*([0-9]+)$/\1/p' )
[ -z ${JOB_NUM} ] && die "JOB_NUM is bad" [ -z ${JOB_NUM} ] && die "JOB_NUM is bad"
# count number of the jobs # count number of the jobs

View File

@@ -80,7 +80,8 @@ else
[ -z ${JOB_PATTERN} ] && die "JOB_PATTERN is bad" [ -z ${JOB_PATTERN} ] && die "JOB_PATTERN is bad"
# parse number 'NUM' at the end of string 'some_your_text_NUM' # parse number 'NUM' at the end of string 'some_your_text_NUM'
JOB_NUM=$( echo ${JOB_NAME} | sed -n -r 's/^.*_([0-9]+)$/\1/p' ) # NOTE: Getting rid of the leading zero to get the decimal
JOB_NUM=$( echo ${JOB_NAME} | sed -n -r 's/^.*_0*([0-9]+)$/\1/p' )
[ -z ${JOB_NUM} ] && die "JOB_NUM is bad" [ -z ${JOB_NUM} ] && die "JOB_NUM is bad"
# count number of the jobs # count number of the jobs