@@ -55,28 +55,28 @@ while [[ "$#" -gt 0 ]]; do
5555 shift
5656done
5757
58- if [ -z " ${containerRegistry} " ]; then
58+ if [[ -z " ${containerRegistry} " ] ]; then
5959 echo " Please provide a container registry argument"
6060 exit 1
6161fi
6262
6363# stop processing if no image name is provided
64- if [ -z " ${functionAppName} " ]; then
64+ if [[ -z " ${functionAppName} " ] ]; then
6565 echo " Please provide an image name as an argument"
6666 exit 1
6767fi
6868
69- if [ -z " ${subscriptionId} " ]; then
69+ if [[ -z " ${subscriptionId} " ] ]; then
7070 echo " Please provide a Subscription ID argument"
7171 exit 1
7272fi
7373
74- if [ -z " ${resourceGroup} " ]; then
74+ if [[ -z " ${resourceGroup} " ] ]; then
7575 echo " Please provide a resource group argument"
7676 exit 1
7777fi
7878
79- if [ verbose == true ]; then
79+ if [[ verbose == true ] ]; then
8080 echo " function app name: $functionAppName "
8181 echo " subscription Id: $subscriptionId "
8282 echo " resourceGroup: $resourceGroup "
8888digest=$( az acr repository show --name $containerRegistry --image $functionAppName :$tag --query ' digest' --output tsv 2> /dev/null)
8989
9090# stop processing if the image does not exist
91- if [ -z " $digest " ]; then
91+ if [[ -z " $digest " ] ]; then
9292 echo " Image $image not found in $containerRegistry "
9393 exit 1
9494fi
9595
9696# echo the digest
97- if [ verbose == true ]; then
97+ if [[ verbose == true ] ]; then
9898 echo $digest
9999fi
100100
0 commit comments