Skip to content

Commit

Permalink
fix: array
Browse files Browse the repository at this point in the history
  • Loading branch information
ValeryG committed Aug 16, 2023
1 parent fef48fc commit d447867
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pr-previews/cleanup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ runs:
# get the list of the "-pr." published version for the packages
pkgDetails=$(npm view "${pkgName}" --json)
prVersions=$(echo ${pkgDetails} | jq -r '.time' | jq -r 'to_entries' | jq --arg jq_oldestDate ${oldestDate} '[.[] | select(.value |.[0:19] +"Z" | fromdateiso8601 > ($jq_oldestDate|tonumber))]' | jq '[.[] | .key]'| grep "\-pr." | tac | sed 's/[,\"]//g')
prVersions=($(echo ${pkgDetails} | jq -r '.time' | jq -r 'to_entries' | jq --arg jq_oldestDate ${oldestDate} '[.[] | select(.value |.[0:19] +"Z" | fromdateiso8601 > ($jq_oldestDate|tonumber))]' | jq '[.[] | .key]'| grep "\-pr." | tac | sed 's/[,\"]//g'))
if [[ -z "${prVersions}" ]]; then
echo "No preview versions found, exiting..."
exit 0
Expand Down

0 comments on commit d447867

Please sign in to comment.