3 # Automate updating package version metadata on bintray.com.
4 # This script should only be run run *after* binary uploads.
7 # Run in the top-level of a tree, ensuring .bintrayrc is available with
8 # valid user setting (username, email, apikey, distro, gpgphrase).
18 [ -e "${topdir}/VERSION.pcp" ] || quit
"Not a PCP git tree, missing VERSION.pcp"
19 [ -e "${topdir}/.bintrayrc" ] || quit
"Tree is unconfigured, missing .bintrayrc"
21 .
${topdir}/.bintrayrc
22 .
${topdir}/VERSION.pcp
24 version
=${PACKAGE_MAJOR}.${PACKAGE_MINOR}.${PACKAGE_REVISION}
25 date=`date "+%Y-%m-%dT00:00:00.000Z"`
27 [ -z "${user}" ] && quit
"user is not configured (via .bintrayrc)"
28 [ -z "${email}" ] && quit
"email is not configured (via .bintrayrc)"
29 [ -z "${apikey}" ] && quit
"apikey is not configured (via .bintrayrc)"
30 [ -z "${gpgpass}" ] && quit
"passphrase is not configured (via .bintrayrc)"
34 distro
="$1"; desc
=`lookup_description "$1"`
36 url
="https://api.bintray.com/packages/pcp/${distro}/pcp/versions/${version}"
37 echo "Updating ${distro} information for ${version}:" && echo " ${url}"
39 -u ${user}:${apikey} \
40 -H "X-GPG-PASSPHRASE: ${gpgpass}" \
41 -H "Content-Type:application/json" \
42 -H "Accept: application/json" \
44 --data "{\"desc\":\"$desc\",\"vcs_tag\":\"$version\",\"released\":\"$date\"}" \
45 "${url};bt_package=pcp;bt_version=${version};publish=1"
55 table["source"] = "Performance Co-Pilot source code, gzipped tarball"
56 table["el5"] = "Performance Co-Pilot builds for EL5"
57 table["el6"] = "Performance Co-Pilot builds for EL6"
58 table["el7"] = "Performance Co-Pilot builds for EL7"
59 table["f21"] = "Performance Co-Pilot builds for Fedora 21"
60 table["f22"] = "Performance Co-Pilot builds for Fedora 22"
61 table["f23"] = "Performance Co-Pilot builds for Fedora 23"
62 table["jessie"] = "Performance Co-Pilot builds for Debian 7 (jessie)"
63 table["wheezy"] = "Performance Co-Pilot builds for Debian 8 (wheezy)"
64 table["precise"] = "Performance Co-Pilot builds for Ubuntu 12.04 (precise pangolin)"
65 table["raring"] = "Performance Co-Pilot builds for Ubuntu 13.04 (raring ringtail)"
66 table["trusty"] = "Performance Co-Pilot builds for Ubuntu 14.04 (trusty tahr)"
67 table["vivid"] = "Performance Co-Pilot builds for Ubuntu 15.04 (vivid vervet)"
68 table["wily"] = "Performance Co-Pilot builds for Ubuntu 15.10 (wily werewolf)"
69 table["xenial"] = "Performance Co-Pilot builds for Ubuntu 16.04 (xenial xerus)"
70 table["macosx"] = "Performance Co-Pilot builds for Mac OS X"
71 table["opensuse13"] = "Performance Co-Pilot builds for OpenSUSE 13"
72 table["solaris11"] = "Performance Co-Pilot builds for Solaris 11"
74 print(table["'$distro'"])
78 debian
="jessie wheezy"
79 ubuntu
="precise raring trusty vivid wily xenial"
81 redhat
="el5 el6 el7 f21 f22 f23"
85 distributions
="source $redhat $debian $ubuntu $macosx $solaris"
86 [ $# -ge 1 ] && distributions
="$@"
88 for distro
in $distributions
90 version_update
$distro