Fix version compare (#12376)

* Fix daily.sh version compare

* 1.70.1
This commit is contained in:
Tony Murray
2020-12-02 08:39:06 -06:00
committed by GitHub
parent 84c08f424c
commit e2fb7ba635
2 changed files with 5 additions and 5 deletions

View File

@@ -30,7 +30,7 @@ use Symfony\Component\Process\Process;
class Version
{
// Update this on release
const VERSION = '1.70.0';
const VERSION = '1.70.1';
protected $is_git_install = false;

View File

@@ -201,14 +201,14 @@ check_dependencies() {
# Exit-Code: 0: if equal 1: if 1 > 2 2: if 1 < 2
#######################################
version_compare () {
local IFS i ver1 ver2 parts1 parts2
local i ver1 ver2 parts1 parts2
if [[ "$1" == "$2" ]]; then
return 0
fi
IFS=.
ver1=("$1")
ver2=("$2")
IFS=. read -ra ver1 <<< "$1"
IFS=. read -ra ver2 <<< "$2"
parts2=${#ver2[@]}
[[ -n $3 ]] && parts2=$3