diff options
author | Joseph-Eugene Winzer <joewinzer@googlemail.com> | 2021-02-11 16:53:43 +0100 |
---|---|---|
committer | Joseph-Eugene Winzer <joewinzer@googlemail.com> | 2021-02-11 16:58:24 +0100 |
commit | b5ab7ea7877317813aaad6f60ab2fba3ed03826c (patch) | |
tree | 064ce1341432096e979f8a7bd7aae49fb526a7cb | |
parent | e3ac8f0f09c6ea1e994797a6f7ed4384563f2e4f (diff) | |
download | ziglings-b5ab7ea7877317813aaad6f60ab2fba3ed03826c.tar.gz ziglings-b5ab7ea7877317813aaad6f60ab2fba3ed03826c.tar.bz2 ziglings-b5ab7ea7877317813aaad6f60ab2fba3ed03826c.tar.xz ziglings-b5ab7ea7877317813aaad6f60ab2fba3ed03826c.zip |
Added zig version check for commit number
-rwxr-xr-x | ziglings | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -18,11 +18,15 @@ fmt_yay=$( tput setaf 2 ) # green foreground fmt_off=$( tput sgr0 ) # reset colors/effects zig_cmd=zig -zig_version_required=( 0 8 0 ) +# zig compiler version ( major minor patch commits_since_last_release ) +zig_version_required=( 0 8 0 1065 ) zig_version=$($zig_cmd version) zig_version=(${zig_version//./ }) +zig_version_commit=(${zig_version[3]//+/ }) -if [[ ${zig_version[0]} -ne ${zig_version_required[0]} || ${zig_version[1]} -lt ${zig_version_required[1]} ]] +if [[ ${zig_version[0]} -ne ${zig_version_required[0]} || + ${zig_version[1]} -lt ${zig_version_required[1]} || + $zig_version_commit -lt ${zig_version_required[3]} ]] then echo "Your current zig version is $(IFS=$'.'; echo "${zig_version[*]}")." echo "Please update your zig compiler to a version >=$(IFS=$'.'; echo "${zig_version_required[*]}") "` |