Skip to content

Commit

Permalink
attempts to fix the script & shellcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
jazzsequence committed Jul 12, 2023
1 parent 706ee08 commit 3910eb8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/test-dependencies-yml.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ valid_versions=true
echo "Checking ${filename} for valid versions..."

# Parse the YAML file and validate the current_tag values
yq eval '(.dependencies[] | keys_unsorted) as $keys | .dependencies[] | .[. as $key | $keys[] | select(. == $key)][0] + ": " + .current_tag' "${filename}" | while IFS=':' read -r key value; do
yq e '.dependencies | to_entries[] | "\(.key): \(.value.current_tag)"' "${filename}" | while IFS=':' read -r key value; do
key=$(echo "${key}" | awk '{$1=$1};1')
value=$(echo "${value}" | awk '{$1=$1};1')

Expand All @@ -45,7 +45,7 @@ yq eval '(.dependencies[] | keys_unsorted) as $keys | .dependencies[] | .[. as $
done

# Exit with an error code if any version comparison is invalid
if ! "$valid_versions"; then
if ! $valid_versions; then
echo -e "${red}One or more versions are invalid.${reset}"
exit 1
else
Expand Down

0 comments on commit 3910eb8

Please sign in to comment.