forked from TykTechnologies/tyk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdist_push.sh
executable file
·32 lines (26 loc) · 918 Bytes
/
dist_push.sh
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
#!/bin/bash
: ${ORGDIR:="/go/src/github.com/TykTechnologies"}
: ${SOURCEBINPATH:="${ORGDIR}/tyk"}
: ${DEBVERS:="ubuntu/trusty ubuntu/xenial ubuntu/bionic debian/jessie debian/stretch debian/buster"}
: ${RPMVERS:="el/6 el/7 el/8"}
: ${PKGNAME:="tyk-gateway"}
echo "Set version number"
: ${VERSION:=$(perl -n -e'/v(\d+).(\d+).(\d+)/'' && print "$1\.$2\.$3"' version.go)}
RELEASE_DIR="$SOURCEBINPATH/build"
export PACKAGECLOUDREPO=$PC_TARGET
cd $RELEASE_DIR/
for arch in i386 amd64 arm64
do
debName="${PKGNAME}_${VERSION}_${arch}.deb"
rpmName="$PKGNAME-$VERSION-1.${arch/amd64/x86_64}.rpm"
for ver in $DEBVERS
do
echo "Pushing $debName to PackageCloud $ver"
package_cloud push tyk/$PACKAGECLOUDREPO/$ver $debName
done
for ver in $RPMVERS
do
echo "Pushing $rpmName to PackageCloud $ver"
package_cloud push tyk/$PACKAGECLOUDREPO/$ver $rpmName
done
done