I have the following Travis CI yml file snippet:
script:
- if [ $TRAVIS_BRANCH == "master" ]; then
sbt clean coverage test coverageReport docker:publishLocal;
fi
- if [ $TRAVIS_BRANCH == "/^develop-.*$/" ]; then
sbt clean coverage test coverageReport;
fi
It sort of works, but I could not understand the logs that it produces. It is sort of misleading. Here is the log from the build server:
[success] Total time: 22 s, completed Aug 8, 2017 5:29:28 PM
The command "if [ $TRAVIS_BRANCH == "master" ]; then sbt clean coverage test coverageReport docker:publishLocal; fi" exited with 0.
0.00s
$ if [ $TRAVIS_BRANCH == "/^develop-.*$/" ]; then sbt clean coverage test coverageReport; fi
The command "if [ $TRAVIS_BRANCH == "/^develop-.*$/" ]; then sbt clean coverage test coverageReport; fi" exited with 0.
How could anything that did not run exit with a code 0? I would have rather expected it to just say, it skipped that script. What do you guys think?