Created
December 5, 2018 20:26
-
-
Save yorek/53c14938d4ec00bb52355abc17147a72 to your computer and use it in GitHub Desktop.
Check that AZ CLI is using a command with a minium version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export curVer=`printf "%03d%03d%03d" $(az --version | grep 'eventgrid' | awk '{gsub(/[()]/, "", $2); print $2}' | tail -1 | tr '.' ' ')` | |
export reqVer=`printf "%03d%03d%03d" $(echo '0.5.0' | tr '.' ' ')` | |
if [[ curVer -lt reqVer ]] ; then | |
echo "error" >&2 | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment