forked from go-graphite/carbon-clickhouse
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackages.sh
executable file
·30 lines (23 loc) · 916 Bytes
/
packages.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
#!/bin/sh
cd `dirname $0`
ROOT=$PWD
docker run -ti -e "DEVEL=${DEVEL:-0}" --rm -v $ROOT:/root/go/src/github.com/lomik/carbon-clickhouse ubuntu:20.04 bash -c '
cd /root/
export GO_VERSION=1.15.1
export TZ=Europe/Moscow
ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
apt update
DEBIAN_FRONTEND=noninteractive apt install -y rpm ruby ruby-dev wget make git gcc
wget https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz
tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz
ln -s /usr/local/go/bin/go /usr/local/bin/go
# newer fpm is broken https://github.com/jordansissel/fpm/issues/1612
gem install rake
gem install fpm:1.10.2
go get github.com/mitchellh/gox
ln -s /root/go/bin/gox /usr/local/bin/gox
cd /root/go/src/github.com/lomik/carbon-clickhouse
make gox-build
make fpm-deb
make fpm-rpm
'