运行PHPDocumentor

时间:2014-11-30 15:33:52

标签: travis-ci

此命令在本地运行正常,但在构建期间不运行

php vendor/bin/phpdoc -d . -t ./build/docs --ignore vendor/,build/,hm-backup/,backdrop/,assets/,bin/,languages/,node_modules/,tests/,readme/

这是输出

  $ php vendor/bin/phpdoc -d $TRAVIS_BUILD_DIR -t ./build/docs --ignore vendor/,build/,hm-backup/,backdrop/,assets/,bin/,languages/,node_modules/,tests/,readme/
  Collecting files .. OK
  Initializing parser .. OK
  Parsing files

  [Exception]                                                                  
  No parsable files were found, did you specify any using the -f or -d parameter?                                                                         

Travis CI build output

.是否未提及当前正在运行的目录?或者它不是存储库根目录?

感谢

1 个答案:

答案 0 :(得分:3)

您不能假设.是您的存储库签出的目录。

Travis实际上提供了一个指向您的存储库的特殊environment variableTRAVIS_BUILD_DIR

所以你可以把你的行写成

php vendor/bin/phpdoc -d $TRAVIS_BUILD_DIR -t $TRAVIS_BUILD_DIR/build/docs --ignore $TRAVIS_BUILD_DIR/vendor/,$TRAVIS_BUILD_DIR/build/,$TRAVIS_BUILD_DIR/hm-backup/,$TRAVIS_BUILD_DIR/backdrop/,$TRAVIS_BUILD_DIR/assets/,$TRAVIS_BUILD_DIR/bin/,$TRAVIS_BUILD_DIR/languages/,$TRAVIS_BUILD_DIR/node_modules/,$TRAVIS_BUILD_DIR/tests/,$TRAVIS_BUILD_DIR/readme/