aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ci/build_travis.py
diff options
context:
space:
mode:
Diffstat (limited to 'ci/build_travis.py')
-rwxr-xr-xci/build_travis.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ci/build_travis.py b/ci/build_travis.py
index dce7fd7..564f964 100755
--- a/ci/build_travis.py
+++ b/ci/build_travis.py
@@ -23,6 +23,11 @@ def _env(name):
return os.environ[name]
+def _check_travis():
+ if 'TRAVIS' not in os.environ:
+ raise RuntimeError('not running on Travis')
+
+
def _get_src_dir():
return _env('TRAVIS_BUILD_DIR')
@@ -31,6 +36,10 @@ def _get_build_dir():
return os.path.join(_env('HOME'), 'build')
+def _get_configuration():
+ return _env('configuration')
+
+
def _setup_logging():
logging.basicConfig(
format='%(asctime)s | %(levelname)s | %(message)s',
@@ -41,9 +50,12 @@ def build_travis(argv=None):
if argv is None:
argv = sys.argv[1:]
logging.info('Command line arguments: %s', argv)
+ _check_travis()
+
travis_argv = [
'--src', _get_src_dir(),
'--build', _get_build_dir(),
+ '--configuration', _get_configuration(),
]
build(travis_argv + argv)