Skip to content

Commit

Permalink
fix: postman release is faling with collection_id: unbound variable
Browse files Browse the repository at this point in the history
  • Loading branch information
andreaangiolillo committed Oct 14, 2024
1 parent d3a42fd commit 77a54c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/postman/scripts/upload-collection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ if [ "$collection_exists" = "false" ]; then
else
# Find collection ID and update collection
echo "Updating remote collection ${current_collection_name}"
collection_id=$(jq -r '.collections | map(select(.name=="'"${current_collection_name}"'").id)[0]' "${COLLECTIONS_LIST_FILE}")

echo "curl --request PUT
--location 'https://api.getpostman.com/collections/${collection_id}'
--header 'Content-Type: application/json'
--header 'X-API-Key: **********'
--data ${collection_transformed_path}"
collection_id=$(jq -r '.collections | map(select(.name=="'"${current_collection_name}"'").id)[0]' "${COLLECTIONS_LIST_FILE}")

curl --show-error --fail --retry 5 --retry-all-errors --silent --request PUT \
--location "https://api.getpostman.com/collections/${collection_id}" \
--header "Content-Type: application/json" \
Expand Down

0 comments on commit 77a54c9

Please sign in to comment.