Skip to content

Instantly share code, notes, and snippets.

@yorek
Created December 5, 2018 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yorek/53c14938d4ec00bb52355abc17147a72 to your computer and use it in GitHub Desktop.
Save yorek/53c14938d4ec00bb52355abc17147a72 to your computer and use it in GitHub Desktop.
Check that AZ CLI is using a command with a minium version
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