mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-01 06:31:48 +01:00
Rewrite biicode build script in Python and simplify
This commit is contained in:
22
support/biicode-build.py
Executable file
22
support/biicode-build.py
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env python
|
||||
# Build the project with Biicode.
|
||||
|
||||
import glob, os, shutil
|
||||
from download import Downloader
|
||||
from subprocess import check_call
|
||||
|
||||
os_name = os.environ['TRAVIS_OS_NAME']
|
||||
if os_name == 'linux':
|
||||
with Downloader().download('http://www.biicode.com/downloads/latest/ubuntu64') as f:
|
||||
check_call(['sudo', 'dpkg', '-i', f])
|
||||
elif os_name == 'osx':
|
||||
with Downloader().download('http://www.biicode.com/downloads/latest/macos') as f:
|
||||
check_call(['sudo', 'installer', '-pkg', f, '-target', '/'])
|
||||
|
||||
project_dir = 'biicode_project'
|
||||
check_call(['bii', 'init', project_dir])
|
||||
cppformat_dir = os.path.join(project_dir, 'blocks/vitaut/cppformat')
|
||||
shutil.copytree('.', cppformat_dir, ignore=shutil.ignore_patterns('biicode_project'))
|
||||
for f in glob.glob('support/biicode/*'):
|
||||
shutil.copy(f, cppformat_dir)
|
||||
check_call(['bii', 'cpp:build'], cwd=project_dir)
|
||||
Reference in New Issue
Block a user