Unverified Commit 23a14c16 authored by Christian Beer's avatar Christian Beer Committed by GitHub

Travis Bintray: fix bug in cleanup script

parent 56a6b420
......@@ -60,6 +60,7 @@ command -v jq >/dev/null 2>&1 || { echo >&2 "jq (command-line json parser) is ne
if [ "${BINTRAY_API_KEY}" == "" ] ; then
echo "BINTRAY_API_KEY is missing; doing nothing"
exit 0
fi
BINTRAY_API=https://api.bintray.com
BINTRAY_USER="${BINTRAY_USER:-ChristianBeer}"
......@@ -102,7 +103,7 @@ ${BINTRAY_CURL} "${BINTRAY_API}/packages/${BINTRAY_REPO_OWNER}/${BINTRAY_REPO}/$
pr_ids=$(jq -r .versions[]? < "${TMPDIR}/package_pr.txt" | cut -d_ -f1 | cut -b 3- | sort -u)
for pr in $pr_ids
do
echo $pr
echo "$pr"
state=$(${GITHUB_CURL} "${GITHUB_API}/repos/${GITHUB_USER}/${GITHUB_REPO}/pulls/${pr}" | jq -r .state)
if [ "$state" = "closed" ]; then
echo " is closed"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment