73: tweak ci/script.sh to make it easier to run it locally r=japaric a=japaric



Co-authored-by: Jorge Aparicio <jorge@japaric.io>
This commit is contained in:
bors[bot] 2019-02-05 09:35:17 +00:00
commit a1e5408d23

View File

@ -26,6 +26,33 @@ main() {
fi
}
# fake Travis variables to be able to run this on a local machine
if [ -z ${TRAVIS_BRANCH-} ]; then
TRAVIS_BRANCH=auto
fi
if [ -z ${TRAVIS_PULL_REQUEST-} ]; then
TRAVIS_PULL_REQUEST=false
fi
if [ -z ${TRAVIS_RUST_VERSION-} ]; then
case $(rustc -V) in
*nightly*)
TRAVIS_RUST_VERSION=nightly
;;
*beta*)
TRAVIS_RUST_VERSION=beta
;;
*)
TRAVIS_RUST_VERSION=stable
;;
esac
fi
if [ -z ${TARGET-} ]; then
TARGET=$(rustc -Vv | grep host | cut -d ' ' -f2)
fi
if [ $TRAVIS_BRANCH != master ]; then
main
fi