mirror of
https://github.com/rust-lang-nursery/rust-cookbook
synced 2024-11-25 04:50:21 +00:00
Travis "cron" builds run tests with "*" dependencies
"cron" builds will trigger cargo test with all dependency versions replaced with "*" to check for incompatible dependencies. Also cron builds will never publish gh-pages
This commit is contained in:
parent
62fd9dc136
commit
ed3a42d9fb
1 changed files with 13 additions and 0 deletions
13
deploy.sh
13
deploy.sh
|
@ -12,6 +12,19 @@ if [ "$TRAVIS_BRANCH" != "master" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
# check for outdated dependencies on nightly builds
|
||||
if [ "${TRAVIS_EVENT_TYPE:-}" == "cron" ]; then
|
||||
echo "This is cron build. Checking for outdated dependencies!"
|
||||
rm ./Cargo.lock
|
||||
cargo clean
|
||||
# replace all [dependencies] versions with "*"
|
||||
sed -i -e "/^\[dependencies\]/,/^\[.*\]/ s|^\(.*=[ \t]*\).*$|\1\"\*\"|" ./Cargo.toml
|
||||
|
||||
cargo test || { echo "Cron build failed! Dependencies outdated!"; exit 1; }
|
||||
echo "Cron build success! Dependencies are up to date!"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Returns 1 if program is installed and 0 otherwise
|
||||
program_installed() {
|
||||
local return_=1
|
||||
|
|
Loading…
Reference in a new issue