Merge pull request #2852 from BOINC/cb_bintray_attributes

Travis Bintray: add attributes to versions for better cleanup
This commit is contained in:
Vitalii Koshura 2018-11-28 23:35:15 +02:00 committed by GitHub
commit 4637252ece
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 0 deletions

View File

@ -111,6 +111,15 @@ data="{
set +x
${CURL} -H Content-Type:application/json -X POST -d "${data}" "${API}/packages/${BINTRAY_REPO_OWNER}/${BINTRAY_REPO}/${PKG_NAME}/versions"
echo "Adding attributes to version ${VERSION}"
# this can be used to cleanup old versions
pr="${TRAVIS_PULL_REQUEST:-0}"
created=$(date -Is)
data="[{\"name\": \"PR\", \"values\": [\"${pr}\"], \"type\": \"string\"},
{\"name\": \"create_time\", \"values\": [\"${created}\"], \"type\": \"date\"}]"
echo $data
${CURL} -H Content-Type:application/json -X POST -d "${data}" "${API}/packages/${BINTRAY_REPO_OWNER}/${BINTRAY_REPO}/${PKG_NAME}/versions/${VERSION}/attributes"
echo "Uploading and publishing ${SOURCE_DIR}/${BOINC_TYPE}.7z..."
if [ -f "${SOURCE_DIR}/${BOINC_TYPE}.7z" ]; then
set +x