Merge pull request #91 from amousset/improve-doc-build
docs(all): Build seperate docs for each release
This commit is contained in:
17
.travis.yml
17
.travis.yml
@@ -1,9 +1,16 @@
|
|||||||
language: rust
|
language: rust
|
||||||
|
|
||||||
rust:
|
rust:
|
||||||
- stable
|
- stable
|
||||||
- beta
|
- beta
|
||||||
- nightly
|
- nightly
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
allow_failures:
|
||||||
|
- rust: nightly
|
||||||
|
|
||||||
sudo: false
|
sudo: false
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
apt: true
|
apt: true
|
||||||
pip: true
|
pip: true
|
||||||
@@ -12,9 +19,11 @@ cache:
|
|||||||
- target/debug/build
|
- target/debug/build
|
||||||
- target/release/deps
|
- target/release/deps
|
||||||
- target/release/build
|
- target/release/build
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- pip install 'travis-cargo<0.2' --user
|
- pip install 'travis-cargo<0.2' --user
|
||||||
- export PATH=$HOME/.local/bin:$PATH
|
- export PATH=$HOME/.local/bin:$PATH
|
||||||
|
|
||||||
addons:
|
addons:
|
||||||
apt:
|
apt:
|
||||||
packages:
|
packages:
|
||||||
@@ -22,16 +31,20 @@ addons:
|
|||||||
- libcurl4-openssl-dev
|
- libcurl4-openssl-dev
|
||||||
- libelf-dev
|
- libelf-dev
|
||||||
- libdw-dev
|
- libdw-dev
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- smtp-sink 2525 1000&
|
- smtp-sink 2525 1000&
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- travis-cargo build
|
- travis-cargo build
|
||||||
- travis-cargo test
|
- travis-cargo test
|
||||||
- travis-cargo doc
|
- travis-cargo doc
|
||||||
- travis-cargo --only stable doc-upload
|
|
||||||
after_success:
|
after_success:
|
||||||
|
- ./.travis/doc.sh
|
||||||
|
- ./.travis/coverage.sh
|
||||||
- travis-cargo --only nightly bench
|
- travis-cargo --only nightly bench
|
||||||
- travis-cargo --only stable coveralls --no-sudo
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
secure: "MaZ3TzuaAHuxmxQkfJdqRfkh7/ieScJRk0T/2yjysZhDMTYyRmp5wh/zkfW1ADuG0uc4Pqsxrsh1J9SVO7O0U5NJA8NKZi/pgiL+FHh0g4YtlHxy2xmFNB5am3Kyc+E7B4XylwTbA9S8ublVM0nvX7yX/a5fbwEUInVk2bA8fpc="
|
secure: "MaZ3TzuaAHuxmxQkfJdqRfkh7/ieScJRk0T/2yjysZhDMTYyRmp5wh/zkfW1ADuG0uc4Pqsxrsh1J9SVO7O0U5NJA8NKZi/pgiL+FHh0g4YtlHxy2xmFNB5am3Kyc+E7B4XylwTbA9S8ublVM0nvX7yX/a5fbwEUInVk2bA8fpc="
|
||||||
|
|||||||
18
.travis/coverage.sh
Executable file
18
.travis/coverage.sh
Executable file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
|
||||||
|
if [ "$TRAVIS_RUST_VERSION" != "stable" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz
|
||||||
|
tar xzf master.tar.gz
|
||||||
|
mkdir kcov-master/build
|
||||||
|
cd kcov-master/build
|
||||||
|
cmake ..
|
||||||
|
make
|
||||||
|
make install DESTDIR=../tmp
|
||||||
|
cd ../..
|
||||||
|
ls target/debug
|
||||||
|
./kcov-master/tmp/usr/local/bin/kcov --coveralls-id=$TRAVIS_JOB_ID --exclude-pattern=/.cargo target/kcov target/debug/lettre-*
|
||||||
38
.travis/doc.sh
Executable file
38
.travis/doc.sh
Executable file
@@ -0,0 +1,38 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
|
||||||
|
if [ "$TRAVIS_RUST_VERSION" != "stable" ] || [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
cargo clean
|
||||||
|
cargo doc --no-deps
|
||||||
|
|
||||||
|
git clone --branch gh-pages "https://$TOKEN@github.com/${TRAVIS_REPO_SLUG}.git" deploy_docs
|
||||||
|
cd deploy_docs
|
||||||
|
|
||||||
|
git config user.email "contact@amousset.me"
|
||||||
|
git config user.name "Alexis Mousset"
|
||||||
|
|
||||||
|
if [ "$TRAVIS_BRANCH" == "master" ]; then
|
||||||
|
rm -rf master
|
||||||
|
mv ../target/doc ./master
|
||||||
|
echo "<meta http-equiv=refresh content=0;url=lettre/index.html>" > ./master/index.html
|
||||||
|
elif [ "$TRAVIS_TAG" != "" ]; then
|
||||||
|
rm -rf $TRAVIS_TAG
|
||||||
|
mv ../target/doc ./$TRAVIS_TAG
|
||||||
|
echo "<meta http-equiv=refresh content=0;url=lettre/index.html>" > ./$TRAVIS_TAG/index.html
|
||||||
|
|
||||||
|
latest=$(echo * | tr " " "\n" | sort -V -r | head -n1)
|
||||||
|
if [ "$TRAVIS_TAG" == "$latest" ]; then
|
||||||
|
|
||||||
|
echo "<meta http-equiv=refresh content=0;url=$latest/lettre/index.html>" > index.html
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
git add -A .
|
||||||
|
git commit -m "Rebuild pages at ${TRAVIS_COMMIT}"
|
||||||
|
git push --quiet origin gh-pages
|
||||||
@@ -10,7 +10,9 @@ All code must be formatted using `rustfmt`.
|
|||||||
|
|
||||||
Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:
|
Each commit message consists of a header, a body and a footer. The header has a special format that includes a type, a scope and a subject:
|
||||||
|
|
||||||
|
```text
|
||||||
<type>(<scope>): <subject> <BLANK LINE> <body> <BLANK LINE> <footer>
|
<type>(<scope>): <subject> <BLANK LINE> <body> <BLANK LINE> <footer>
|
||||||
|
```
|
||||||
|
|
||||||
Any line of the commit message cannot be longer 72 characters.
|
Any line of the commit message cannot be longer 72 characters.
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
[](https://travis-ci.org/lettre/lettre)
|
[](https://travis-ci.org/lettre/lettre)
|
||||||
[](https://ci.appveyor.com/project/amousset/lettre/branch/master)
|
[](https://ci.appveyor.com/project/amousset/lettre/branch/master)
|
||||||
[](https://coveralls.io/github/lettre/lettre?branch=master)
|
[](https://coveralls.io/github/lettre/lettre?branch=master)
|
||||||
[](https://crates.io/crates/lettre)
|
[](https://crates.io/crates/lettre)
|
||||||
[](./LICENSE)
|
[](./LICENSE)
|
||||||
[](https://gitter.im/lettre/lettre?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
[](https://gitter.im/lettre/lettre?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
||||||
|
|
||||||
@@ -15,7 +15,7 @@ To use this library, add the following to your `Cargo.toml`:
|
|||||||
|
|
||||||
```toml
|
```toml
|
||||||
[dependencies]
|
[dependencies]
|
||||||
lettre = "0.5"
|
lettre = "0.6"
|
||||||
```
|
```
|
||||||
|
|
||||||
## Testing
|
## Testing
|
||||||
|
|||||||
Reference in New Issue
Block a user