travis-env.inc.sh 851 B

1234567891011121314151617181920212223242526
  1. # source it from parent directory to mimic Travis-CI
  2. # environmental variables needed in scripts
  3. if [[ -d .git ]]; then
  4. export TRAVIS_BUILD_DIR=`pwd`
  5. else
  6. echo "ERROR: include it from repository parent directory!!!"
  7. return
  8. fi
  9. export TRAVIS_COMMIT="THIS_IS_FAKE_COMMIT_HASH_FOR_TESTS_ONLY1"
  10. export TRAVIS_COMMIT_MESSAGE="Example commit message"
  11. export TRAVIS_EVENT_TYPE="push"
  12. export TRAVIS_OS_NAME="linux"
  13. export TRAVIS_PULL_REQUEST="false"
  14. export TRAVIS_PULL_REQUEST_BRANCH=""
  15. export TRAVIS_PULL_REQUEST_SHA=""
  16. export TRAVIS_PULL_REQUEST_SLUG=""
  17. export TRAVIS_REPO_SLUG=$(git config --get travis.slug)
  18. if [[ -z "$TRAVIS_REPO_SLUG" ]]; then
  19. export TRAVIS_REPO_SLUG=$(git config --get remote.origin.url|sed 's/.*github\.com.//'|sed 's/\.git$//')
  20. fi
  21. export TRAVIS_SUDO="false"
  22. export TRAVIS_BRANCH=$(git rev-parse --abbrev-ref HEAD)