forked from ricbra/rabbitmq-cli-consumer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_deb.sh
More file actions
executable file
·34 lines (28 loc) · 817 Bytes
/
build_deb.sh
File metadata and controls
executable file
·34 lines (28 loc) · 817 Bytes
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
#!/bin/bash
if [ -z ${1+x} ];
then
echo "Missing version number!";
exit
else
echo "Preparing version $1"
fi
ARCHS['amd64']='amd64'
ARCHS['386']='i386'
DIR=`mktemp -d /tmp/rabbitmq.XXXX`
CWD=`pwd`
for ARCH in 'amd64' '386'
do
BUILD=${ARCHS[$ARCH]}
gox -osarch="linux/$ARCH" -output="$DIR/$ARCH/usr/bin/{{.Dir}}"
fpm -s dir -t deb -C $DIR/$ARCH -a $BUILD --name rabbitmq-cli-consumer --version $1 --description "Consume RabbitMQ messages into any cli program" .
done
for ARCH in 'linux/amd64' 'linux/386' 'linux/arm' 'darwin/amd64'
do
arch_suffix=${ARCH/\//-}
gox -osarch="$ARCH" -output="$DIR/{{.Dir}}"
cd $DIR
tar -zcvf $CWD/rabbitmq-cli-consumer-$arch_suffix.tar.gz rabbitmq-cli-consumer
rm -rf rabbitmq-cli-consumer
cd $CWD
done
rm -rf $DIR