In a Makefile, how can I store the output of a command as a variable?
I am trying:
vm_instance_name = foo
registry = us.gcr.io/acmeinc
image_name = bar
image_tag = $(docker images ${registry}/${image_name} | awk '{print $2}' | awk 'NR==2')
deploy:
gcloud beta compute instances update-container $(vm_instance_name) --container-image=$(registry)/$(image_name):$(image_tag)
But that's not working. $image_tag
is empty.