chore: updates build system

This commit is contained in:
Kevin K 2015-07-29 15:18:05 -04:00
parent 7f77c72701
commit 80baab2672
2 changed files with 16 additions and 9 deletions

View file

@ -1,14 +1,18 @@
language: rust
rust:
- nightly
- beta
- stable
before_script:
- pip install 'travis-cargo<0.2' --user && export PATH=$HOME/.local/bin:$PATH
- |
pip install 'travis-cargo<0.2' --user &&
export PATH=$HOME/.local/bin:$PATH
script:
- travis-cargo build
- travis-cargo test
- make -C clap-tests test
- travis-cargo doc
- |
travis-cargo build &&
travis-cargo test &&
make -C clap-tests test &&
travis-cargo --only stable doc
after_success:
- travis-cargo --only stable doc-upload
env:

View file

@ -7,16 +7,19 @@ test:
build:
cargo build
doc:
update-readme:
cd "$(THIS_DIR)"
cp src/lib.rs code.bak
cat README.md | sed -e 's/^/\/\/! /g' > readme.bak
sed -i '/\/\/!/d' src/lib.rs
sed -i '/\/\/ DOCS/r readme.bak' src/lib.rs
rm -rf docs/*
(cargo doc --no-deps && make clean) || (make clean && false)
cat src/lib.rs | sed -e 's/`rust/`ignore/g' > src/lib.rs.tmp
cat src/lib.rs.tmp | sed -e 's/`toml/`ignore/g' > src/lib.rs
cat src/lib.rs | sed -e 's/\`sh/`ignore/g' > src/lib.rs.tmp
make clean || (make clean && false)
clean:
cp -r target/doc/* docs/
cd "$(THIS_DIR)"
mv code.bak src/lib.rs || true
rm src/lib.rs.t* || true
rm *.bak || true