Files
tubestation/third_party/rust/libc/ci/dox.sh
Kartikaya Gupta 85aad79ed8 Bug 1336549 - Update third-party vendored crates required by mozjs_sys. r=fitzgen,rillian
This updates the following third-party dependencies of mozjs_sys:
    gcc v0.3.40 -> v0.3.42
    libc v0.2.18 -> v0.2.20
    libz-sys v1.0.10 -> v1.0.12
    pkg-config v0.3.8 -> v0.3.9

Since libc is updated, we also need to update the gkrust lockfiles to use the
new version, because leaving it at 0.2.18 will result in improper vendoring of
the crates (see bug 1336528). None of the other mozjs_sys crates are shared by
gkrust.

MozReview-Commit-ID: 5FHELF8YKD0
2017-02-03 16:36:06 -05:00

34 lines
1.0 KiB
Bash

#!/bin/sh
# Builds documentation for all target triples that we have a registered URL for
# in liblibc. This scrapes the list of triples to document from `src/lib.rs`
# which has a bunch of `html_root_url` directives we pick up.
set -e
TARGETS=`grep html_root_url src/lib.rs | sed 's/.*".*\/\(.*\)"/\1/'`
rm -rf target/doc
mkdir -p target/doc
cp ci/landing-page-head.html target/doc/index.html
for target in $TARGETS; do
echo documenting $target
rustdoc -o target/doc/$target --target $target src/lib.rs --cfg dox \
--crate-name libc
echo "<li><a href="/libc/$target/libc/index.html">$target</a></li>" \
>> target/doc/index.html
done
cat ci/landing-page-footer.html >> target/doc/index.html
# If we're on travis, not a PR, and on the right branch, publish!
if [ "$TRAVIS_PULL_REQUEST" = "false" ] && [ "$TRAVIS_BRANCH" = "master" ]; then
pip install ghp_import --install-option="--prefix=$HOME/.local"
$HOME/.local/bin/ghp-import -n target/doc
git push -qf https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git gh-pages
fi