From e2c3acf4d58c015470caaf3451934c4bc5a5fd8c Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Fri, 7 Dec 2018 19:41:50 +0100 Subject: [PATCH] Copy from etc/doc.servo.org in `./mach doc` --- etc/ci/upload_docs.sh | 4 ---- python/servo/post_build_commands.py | 11 ++++++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/etc/ci/upload_docs.sh b/etc/ci/upload_docs.sh index 4aab401bdee..d8cc8983087 100755 --- a/etc/ci/upload_docs.sh +++ b/etc/ci/upload_docs.sh @@ -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 diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index dc2731c0318..9af82449808 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -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',