You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
844 B

  1. #!/bin/bash -x
  2. set -e
  3. OS=$TRAVIS_OS_NAME
  4. case $OS in
  5. linux)
  6. # Only deploy for non pull requests
  7. if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then
  8. echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
  9. # Deploy as debug/release
  10. case "$CONFIG" in
  11. *DebugTravis)
  12. docker commit carl movesrwth/carl:travis-debug
  13. docker push movesrwth/carl:travis-debug
  14. ;;
  15. *ReleaseTravis)
  16. docker commit carl movesrwth/carl:travis
  17. docker push movesrwth/carl:travis
  18. ;;
  19. *)
  20. echo "Unrecognized value of CONFIG: $CONFIG"; exit 1
  21. ;;
  22. esac
  23. fi
  24. ;;
  25. osx)
  26. echo "Building carl on Mac OSX not used."
  27. exit 1
  28. ;;
  29. *)
  30. # Unknown OS
  31. echo "Unsupported OS: $OS"
  32. exit 1
  33. esac