Copy from etc/doc.servo.org in ./mach doc

This commit is contained in:
Simon Sapin 2018-12-07 19:41:50 +01:00
parent 4ef1db879c
commit e2c3acf4d5
2 changed files with 8 additions and 7 deletions

View file

@ -18,10 +18,6 @@ cd "$(dirname ${0})/../.."
./etc/ci/clean_build_artifacts.sh
env CC=gcc-5 CXX=g++-5 ./mach doc
# etc/doc.servo.org/index.html overwrites $(mach rust-root)/doc/index.html
# Use recursive copy here to avoid `cp` returning an error code
# when it encounters directories.
cp -r etc/doc.servo.org/* target/doc/
python components/style/properties/build.py servo html regular

View file

@ -263,10 +263,15 @@ class PostBuildCommands(CommandBase):
else:
copy2(full_name, destination)
return self.call_rustup_run(
returncode = self.call_rustup_run(
["cargo", "doc", "--manifest-path", self.ports_servo_manifest()] + params,
env=self.build_env()
)
env=self.build_env())
if returncode:
return returncode
static = path.join(self.context.topdir, "etc", "doc.servo.org")
for name in os.listdir(static):
copy2(path.join(static, name), path.join(docs, name))
@Command('browse-doc',
description='Generate documentation and open it in a web browser',