mirror of
https://github.com/clap-rs/clap
synced 2024-12-04 18:19:13 +00:00
chore: updates build system
This commit is contained in:
parent
7f77c72701
commit
80baab2672
2 changed files with 16 additions and 9 deletions
14
.travis.yml
14
.travis.yml
|
@ -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:
|
||||
|
|
11
Makefile
11
Makefile
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue