File: bintray-version

package info (click to toggle)
pcp 5.2.6-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 185,908 kB
  • sloc: ansic: 307,504; sh: 138,932; xml: 90,613; cpp: 65,924; python: 18,517; perl: 16,958; yacc: 8,925; lex: 2,843; makefile: 1,502; fortran: 60; java: 52
file content (103 lines) | stat: -rwxr-xr-x 3,915 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/bin/sh
# 
# Automate updating package version metadata on bintray.com.
# This script should only be run run *after* binary uploads.
#

# Run in the top-level of a tree, ensuring .bintrayrc is available with
# valid user setting (username, email, apikey, distro, gpgphrase).

topdir=`pwd`

quit()
{
    echo $*
    exit 1
}

[ -e "${topdir}/VERSION.pcp" ] || quit "Not a PCP git tree, missing VERSION.pcp"
[ -e "${topdir}/.bintrayrc" ] || quit "Tree is unconfigured, missing .bintrayrc"

. ${topdir}/.bintrayrc
. ${topdir}/VERSION.pcp

version=${PACKAGE_MAJOR}.${PACKAGE_MINOR}.${PACKAGE_REVISION}
date=`date "+%Y-%m-%dT00:00:00.000Z"`

[ -z "${user}" ] && quit "user is not configured (via .bintrayrc)"
[ -z "${email}" ] && quit "email is not configured (via .bintrayrc)"
[ -z "${apikey}" ] && quit "apikey is not configured (via .bintrayrc)"
[ -z "${gpgpass}" ] && quit "passphrase is not configured (via .bintrayrc)"

version_update()
{
    distro="$1"; desc=`lookup_description "$1"`

    url="https://api.bintray.com/packages/pcp/${distro}/pcp/versions/${version}"
    echo "Updating ${distro} information for ${version}:" && echo "    ${url}"
    curl \
	-u ${user}:${apikey} \
	-H "X-GPG-PASSPHRASE: ${gpgpass}" \
	-H "Content-Type:application/json" \
	-H "Accept: application/json" \
	--request PATCH \
	--data "{\"desc\":\"$desc\",\"vcs_tag\":\"$version\",\"released\":\"$date\"}" \
	"${url};bt_package=pcp;bt_version=${version};publish=1"
    echo
}

lookup_description()
{
    distro="$1"

    awk </dev/null '
	BEGIN {
table["source"] = "Performance Co-Pilot source code, gzipped tarball"
table["el5"] = "Performance Co-Pilot builds for EL5"
table["el6"] = "Performance Co-Pilot builds for EL6"
table["el7"] = "Performance Co-Pilot builds for EL7"
table["el8"] = "Performance Co-Pilot builds for EL8"
table["f24"] = "Performance Co-Pilot builds for Fedora 24"
table["f25"] = "Performance Co-Pilot builds for Fedora 25"
table["f26"] = "Performance Co-Pilot builds for Fedora 26"
table["f27"] = "Performance Co-Pilot builds for Fedora 27"
table["f28"] = "Performance Co-Pilot builds for Fedora 28"
table["f29"] = "Performance Co-Pilot builds for Fedora 29"
table["f30"] = "Performance Co-Pilot builds for Fedora 30"
table["f31"] = "Performance Co-Pilot builds for Fedora 31"
table["jessie"] = "Performance Co-Pilot builds for Debian 7 (jessie)"
table["wheezy"] = "Performance Co-Pilot builds for Debian 8 (wheezy)"
table["stretch"] = "Performance Co-Pilot builds for Debian 9 (stretch)"
table["buster"] = "Performance Co-Pilot builds for Debian 10 (buster)"
table["trusty"] = "Performance Co-Pilot builds for Ubuntu 14.04 (trusty tahr)"
table["vivid"] = "Performance Co-Pilot builds for Ubuntu 15.04 (vivid vervet)"
table["xenial"] = "Performance Co-Pilot builds for Ubuntu 16.04 (xenial xerus)"
table["zesty"] = "Performance Co-Pilot builds for Ubuntu 17.04 (zesty zapus)"
table["bionic"] = "Performance Co-Pilot builds for Ubuntu 18.04 (bionic beaver)"
table["disco"] = "Performance Co-Pilot builds for Ubuntu 19.04 (disco dingo)"
table["macosx"] = "Performance Co-Pilot builds for Mac OS X"
table["opensuse13"] = "Performance Co-Pilot builds for OpenSUSE 13"
table["opensuse14"] = "Performance Co-Pilot builds for OpenSUSE 14"
table["opensuse15"] = "Performance Co-Pilot builds for OpenSUSE 15"
table["opensuseleap"] = "Performance Co-Pilot builds for OpenSUSE Leap"
table["solaris11"] = "Performance Co-Pilot builds for Solaris 11"
	} END {
	    print(table["'$distro'"])
	}'
}

debian="jessie wheezy stretch"
ubuntu="trusty vivid xenial zesty bionic disco"
macosx="macosx"
redhat="el5 el6 el7 el8 f24 f25 f26 f27 f28 f29 f30"
solaris="solaris11"
suse="opensuse13 opensuse14 opensuse15 opensuseleap"
testing="f29-testing el7-testing"

distributions="source $redhat $debian $ubuntu $macosx $solaris"
[ $# -ge 1 ] && distributions="$@"

for distro in $distributions
do
    version_update $distro
done