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?我寧可期望它只是說,它會跳過該腳本。你們有什麼感想?