blob: d3e17948ae349d9bec361a76dbe5c5645c6e18b0 (
plain)
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
|
#!/bin/bash
set -x
BUILD_PATH=/tmp/pix-user-agent-build
PIXELATED_LIB_PATH=$BUILD_PATH/var/lib/pixelated
PIXELATED_WEB_LIB_PATH=$PIXELATED_LIB_PATH/web-ui/app
PIXELATED_VIRTUALENV_PATH=$PIXELATED_LIB_PATH/virtualenv
BIN_PATH=$BUILD_PATH/usr/local/bin
# create build folder
[[ ! -d "$BUILD_PATH" ]] && mkdir $BUILD_PATH
rm -rf $BUILD_PATH/*
# create internal folders
mkdir -p $BIN_PATH
mkdir -p $PIXELATED_LIB_PATH
mkdir -p $PIXELATED_WEB_LIB_PATH
mkdir -p $BUILD_PATH
# build web-ui code
cd web-ui
bundle install --path=~/pixelated-gems
npm install
node_modules/bower/bin/bower install
./go package
cd ..
# copy code
cp -rf service $PIXELATED_LIB_PATH
cp -rf web-ui/dist/* $PIXELATED_WEB_LIB_PATH
# build virtual env
virtualenv $PIXELATED_VIRTUALENV_PATH
. $PIXELATED_VIRTUALENV_PATH/bin/activate
easy_install leap.soledad.common
pip install -r service/requirements.txt
deactivate
cp package/pixelated-user-agent $BIN_PATH
cd $BUILD_PATH
[[ ! -f '/tmp/gems/bin/fpm' ]] && GEM_HOME=/tmp/gems gem install fpm
GEM_HOME=/tmp/gems /tmp/gems/bin/fpm -s dir -t deb -n pixelated-user-agent -C . .
|