File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 44
44
45
45
CHECKBOX=" "
46
46
if [ " ${INPUT_CHECKBOX} " = true ]; then
47
- # Check if the version is higher than 0.18.1
48
- if [ " $( lychee --version | head -n1 | cut -d" " -f4) " -lt 0.18.1 ]; then
49
- echo " WARNING: 'checkbox' is not supported in lychee versions lower than 0.18.1. Continuing without 'checkbox'."
47
+ # Warn if the version is lower than 0.18.1
48
+ function version_lt() { test " $( echo " $@ " | tr " " " \n" | sort -rV | head -n 1) " ! = " $1 " ; }
49
+ lychee_version=" $( lychee --version | head -n1 | cut -d" " -f2) "
50
+ if version_lt " $lychee_version " " 0.18.1" ; then
51
+ echo " WARNING: 'checkbox' is not supported in lychee versions lower than 0.18.1 (current is $lychee_version ). Continuing without 'checkbox'."
50
52
else
51
53
CHECKBOX=" --mode task"
52
54
fi
You can’t perform that action at this time.
0 commit comments