Verified Commit 151470fb authored by noplanman's avatar noplanman
Browse files

Make output a bit prettier and also add downloads the the download list for easy access.

parent 973ffd40
......@@ -26,27 +26,39 @@ DATA="{
\"public_stats\": true
echo "Creating package ${PKG_NAME}..."
${CURL} -X POST -d "${DATA}" "${API}/packages/${BINTRAY_REPO}"
printf "%s" "Creating package ${PKG_NAME}..."
PACKAGE=$(${CURL} -s -X POST -d "${DATA}" "${API}/packages/${BINTRAY_REPO}")
echo " 👍 Done!"
echo "${PACKAGE}"
for BIN in $(ls borg-${VERSION}-*); do
ARCH=$(echo "${BIN}" | cut -d/ -f4 | cut -d- -f3)
${CURL} --write-out %{http_code} --silent --output "${LOG}" \
${CURL} -s --write-out %{http_code} --output "${LOG}" \
-T "${BIN}" -H X-Bintray-Package:"${PKG_NAME}" -H X-Bintray-Version:"${VERSION}" \
if [ $STATUS_CODE -eq 201 ]; then
echo "Publishing ${UPSTREAM}..."
echo $(
${CURL} -X POST -d "{ \"discard\": \"false\" }" \
printf "%s" "Publishing ${UPSTREAM}..."
PUBLISH=$(${CURL} -s -X POST -d "{ \"discard\": \"false\" }" \
# Give the file some time to arrive...
sleep 5
printf "%s" "Adding to download list..."
${CURL} -s -X PUT -d "{ \"list_in_downloads\": \"true\" }" \
"${API}/file_metadata/${BINTRAY_REPO}/${UPSTREAM}" > /dev/null
echo " 👍 Done!"
echo "${PUBLISH}"
echo "Cannot publish ${UPSTREAM}!" && cat ${LOG} && exit 1
echo "😖 Cannot publish ${UPSTREAM}!"
echo "$(cat "${LOG}")"
exit 1
rm "${LOG}"
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