[infra] Ugly hack to save disk space after a build.

This commit is contained in:
Oliver Chang 2017-04-03 20:09:07 -07:00
parent d04cf77f04
commit cb91f9957f
1 changed files with 3 additions and 1 deletions

View File

@ -156,7 +156,9 @@ def get_build_steps(project_yaml):
'-c',
# Remove /out to break loudly when a build script incorrectly uses
# /out instead of $OUT.
'rm -r /out && cd /src/{1} && mkdir -p {0} && compile'.format(out, name),
# We also remove /work and /src to save disk space after a step.
# Container Builder doesn't pass --rm to docker run yet.
'rm -r /out && cd /src/{1} && mkdir -p {0} && compile && rm -rf /work && rm -rf /src'.format(out, name),
],
},
# zip binaries