0
我有以下的特拉维斯CI YML文件片段:特拉维斯CI直列bash脚本
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
它有点工作,但我不明白的是它产生的日志。这是有点误导。以下是来自构建服务器的日志:
[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.
如何运行任何不能退出的代码0?我宁可期望它只是说,它会跳过该脚本。你们有什么感想?