source: bintray-upload.sh @ 1cdbc6a

develop
Last change on this file since 1cdbc6a was 1cdbc6a, checked in by Shane Alcock <salcock@…>, 21 months ago

Attempt to automate upload of packages to our bintray

  • Property mode set to 100755
File size: 1.5 KB
Line 
1#!/bin/bash
2
3set -x -e -o pipefail
4
5VERSION=${CI_COMMIT_REF_NAME}
6PKGVERSION=1
7ARCH=amd64
8
9APIKEY=${BINTRAY_API_KEY}
10
11UBUNTU_DISTS=("xenial" "artful" "bionic")
12DEBIAN_DISTS=("stretch" "jessie" "sid" "buster")
13PACKAGE_LIST=("libtrace4" "libtrace4-dev" "libtrace4-tools" "libpacketdump4" "libpacketdump4-dev")
14
15for i in "${UBUNTU_DISTS[@]}"
16do
17        for comp in "${PACKAGE_LIST[@]}"; do
18                echo ubuntu_$i/${comp}
19
20                if [ ! -f built-packages/ubuntu_$i/${comp}_${VERSION}-${PKGVERSION}_${ARCH}.deb ]; then
21                        continue
22                fi
23
24                curl -T built-packages/ubuntu_$i/${comp}_${VERSION}-${PKGVERSION}_${ARCH}.deb -usalcock:$APIKEY "https://api.bintray.com/content/wand/debian/$comp/$VERSION/pool/$i/main/lib${comp:3:1}/${comp}_${VERSION}-${PKGVERSION}_${ARCH}.deb;deb_distribution=$i;deb_component=main;deb_architecture=$ARCH"
25        done
26done
27
28for i in "${DEBIAN_DISTS[@]}"
29do
30        for comp in "${PACKAGE_LIST[@]}"; do
31                echo debian_$i/${comp}
32                if [ ! -f built-packages/debian_$i/${comp}_${VERSION}-${PKGVERSION}_${ARCH}.deb ]; then
33                        continue
34                fi
35
36                curl -T built-packages/debian_$i/${comp}_${VERSION}-${PKGVERSION}_${ARCH}.deb -usalcock:$APIKEY "https://api.bintray.com/content/wand/debian/$comp/$VERSION/pool/$i/main/lib${comp:3:1}/${comp}_${VERSION}-${PKGVERSION}_${ARCH}.deb;deb_distribution=$i;deb_component=main;deb_architecture=$ARCH"
37        done
38done
Note: See TracBrowser for help on using the repository browser.