-
Notifications
You must be signed in to change notification settings - Fork 149
/
Copy pathbuild.py
32 lines (23 loc) · 952 Bytes
/
build.py
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
"""
Executed in Javascript driver container.
Responsible for building driver and test backend.
"""
from common import is_deno, is_team_city, run, run_in_driver_repo, DRIVER_REPO
import os
def copy_files_to_workdir():
run(["cp", "-fr", "./", DRIVER_REPO])
run(["chown", "-Rh", "driver:driver", DRIVER_REPO])
def init_monorepo():
run_in_driver_repo(["rm", "-fr", "node_modules"], env=os.environ)
run_in_driver_repo(["yarn", "install", "--ignore-engines"], env=os.environ)
def clean_and_build():
run_in_driver_repo(["yarn", "run", "build::deno", "--", "--",
"--output=lib2/"], env=os.environ)
if is_deno() and is_team_city():
run_in_driver_repo(["diff", "-r", "-u",
"packages/neo4j-driver-deno/lib/",
"packages/neo4j-driver-deno/lib2/"])
if __name__ == "__main__":
copy_files_to_workdir()
init_monorepo()
clean_and_build()