Skip to content

Commit 5351223

Browse files
authored
Update tools/get-images.sh to handle both Go and Python versions of yq (#563)
* Update tools/get-images.sh to handle both Go and Python version of yq * Add set -xe to get-images.sh
1 parent e3bdcdf commit 5351223

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tools/get-images.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
# This script returns list of container images that are managed by this charm and/or its workload
44
#
55
# dynamic list
6+
7+
set -xe
8+
69
IMAGE_LIST=()
7-
IMAGE_LIST+=($(find -type f -name metadata.yaml -exec yq '.resources | to_entries | .[] | .value | ."upstream-source"' {} \;))
8-
IMAGE_LIST+=($(find -type f -name config.yaml -exec yq '.options.*-image | select(.) | .default' {} \;))
10+
IMAGE_LIST+=($(find -type f -name metadata.yaml -exec yq '.resources | to_entries | .[] | .value | ."upstream-source"' {} \; | tr -d '"'))
11+
IMAGE_LIST+=($(find -type f -name config.yaml -exec yq '.options | with_entries(select(.key | test("-image$"))) | .[].default' {} \; | tr -d '"'))
912
printf "%s\n" "${IMAGE_LIST[@]}"

0 commit comments

Comments
 (0)