paul
paul

Reputation: 572

Running PHPDocumentor

This command runs fine locally, but not during the build

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

Here's the output

  $ 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

Does the . not refer to current working dir? or is it not the repository root?

thanks

Upvotes: 0

Views: 446

Answers (1)

Odi
Odi

Reputation: 6916

You can not assume that . is the directory where your repository is checked out.

Travis actually provides a special environment variable that points to your repository: TRAVIS_BUILD_DIR

So you could write your line as

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/

Upvotes: 3

Related Questions