diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2019-12-14 03:46:03 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2019-12-15 00:49:01 +0300 |
commit | 86f069fe70a8ece2829953264ef372d0a661b454 (patch) | |
tree | 1f7f07caf7d52fa1a5aa0aa17def5742be1fdfc1 /ci/build_travis.py | |
parent | fix PyLint warnings (diff) | |
download | cmake-common-86f069fe70a8ece2829953264ef372d0a661b454.tar.gz cmake-common-86f069fe70a8ece2829953264ef372d0a661b454.zip |
build: clean up silly cmd line params
They were just plain synonyms for CMake flags, barely had any value.
Diffstat (limited to 'ci/build_travis.py')
-rwxr-xr-x | ci/build_travis.py | 12 |
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) |