11#! /usr/bin/env bash
22
3- if [ " $TRAVIS_OS_NAME " == " linux" ]; then
4- source /venv/bin/activate
5- else
6- source /tmp/venv/bin/activate
7- fi
3+ set -ex
84
9- cmake -H. -Bbuild_rel -DHUNTER_ROOT=hunter-root -DCMAKE_BUILD_TYPE=Release
10-
11- cmake --build build_rel
5+ if [ " $CI " != " true" ]; then
6+ echo " This script is supposed to run on the CI, it may break your system"
7+ exit 1
8+ fi
129
13- if [ " $TRAVIS_OS_NAME " == " linux" ]; then
14- strip -s build_rel/python/task_maker/bin/task-maker
15- else
10+ if [ " $TOOLCHAIN " == " archlinux" ]; then
11+ # TODO pull from aur.archlinux.org the PKGBUILD and build the package from
12+ # that
13+ echo " Release not supported yet"
14+ elif [ " $TOOLCHAIN " == " osx" ]; then
15+ source /tmp/venv/bin/activate
16+ cmake -H. -Bbuild_rel -DHUNTER_ROOT=hunter-root -DCMAKE_BUILD_TYPE=Release
17+ cmake --build build_rel
1618 strip build_rel/python/task_maker/bin/task-maker
19+ # TODO strip the frontend?
20+ chmod +x build_rel/python/setup.py
21+ # TODO build something?
22+ else
23+ cmake -H. -Bbuild_rel -DHUNTER_ROOT=hunter-root -DCMAKE_BUILD_TYPE=Release
24+ cmake --build build_rel
25+ strip -s build_rel/python/task_maker/bin/task-maker
26+ strip -s build_rel/python/task_maker/task_maker_frontend.so
27+ chmod +x build_rel/python/setup.py
28+ cd build_rel/python
29+ ./setup.py install --root=root --prefix=/usr --optimize=1
30+ find root -name __pycache__ -exec rm -rv " {}" +
31+ find -name site-packages | sed -e " p;s/site/dist/" | xargs -n2 mv
32+ cp -r ../DEBIAN root
33+ dpkg-deb --build root task-maker-${TRAVIS_TAG} _${TOOLCHAIN} _amd64.deb
34+ lintian task-maker-${TRAVIS_TAG} _${TOOLCHAIN} _amd64.deb -i || true
1735fi
18-
19- chmod +x build_rel/python/setup.py
20-
21- ( cd build_rel/python && zip -r task-maker-$TRAVIS_TAG -$TRAVIS_OS_NAME .zip requirements.txt setup.py task_maker )
0 commit comments