Frage

I know that there are some default variables for testing with different environments, like the one (for PHP projects) like SYMFONY_VERSION.

My question is simple: would be possible to define a custom variable, for testing with a few specific version of another package (on which I'm depending on)?

I've tried:

env:
  - SYMFONY_VERSION=2.0.*
  - SYMFONY_VERSION=2.1.*
  - BUZZ_VERSION=0.6
  - BUZZ_VERSION=0.*

before_script:
  - composer require symfony/dependency-injection:${SYMFONY_VERSION} 
        kriswallsmith/buzz:${BUZZ_VERSION}

But it doesn't work, I've got a failed build due to "undefined index":

enter image description here

War es hilfreich?

Lösung

http://about.travis-ci.org/docs/user/build-configuration/#Set-environment-variables

  1. You need both symfony and buzz in one build, so they need to be placed in one line
  2. Wildcard (*) should be quoted

Summing up:

env:
  - SYMFONY_VERSION="2.0.*" BUZZ_VERSION="0.6"
  - SYMFONY_VERSION="2.1.*" BUZZ_VERSION="0.*"
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top