Skip to content

Instantly share code, notes, and snippets.

@ttrahan
Last active October 27, 2016 00:29
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 ttrahan/dbd318165c084455da11299f278e5e4b to your computer and use it in GitHub Desktop.
Save ttrahan/dbd318165c084455da11299f278e5e4b to your computer and use it in GitHub Desktop.
# Extract image tag
# when sourcing this file, pass in the name of the image resource as the only parameter
echo -e "\n*** extracting image information ***"
get_image() {
local IMAGE_FILE="./IN/$1/version.json"
if [ -f "$IMAGE_FILE" ]; then
export IMAGE_TAG=$(jq -r '.version.versionName' $IMAGE_FILE)
fi
}
get_image $1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment