Skip to content

Commit 77a54c9

Browse files
fix: postman release is faling with collection_id: unbound variable
1 parent d3a42fd commit 77a54c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/postman/scripts/upload-collection.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,14 @@ if [ "$collection_exists" = "false" ]; then
5454
else
5555
# Find collection ID and update collection
5656
echo "Updating remote collection ${current_collection_name}"
57+
collection_id=$(jq -r '.collections | map(select(.name=="'"${current_collection_name}"'").id)[0]' "${COLLECTIONS_LIST_FILE}")
58+
5759
echo "curl --request PUT
5860
--location 'https://api.getpostman.com/collections/${collection_id}'
5961
--header 'Content-Type: application/json'
6062
--header 'X-API-Key: **********'
6163
--data ${collection_transformed_path}"
62-
collection_id=$(jq -r '.collections | map(select(.name=="'"${current_collection_name}"'").id)[0]' "${COLLECTIONS_LIST_FILE}")
64+
6365
curl --show-error --fail --retry 5 --retry-all-errors --silent --request PUT \
6466
--location "https://api.getpostman.com/collections/${collection_id}" \
6567
--header "Content-Type: application/json" \

0 commit comments

Comments
 (0)