Travis: different `script` for different branch? : <p>I'd like to setup deployment based on branches using Travis-CI and Github.</p>

<p>I.e. - if we made build from <code>develop</code> - then exec <code>/deploy.rb</code> with DEV env hostname, if <code>master</code> - then <code>./deploy.rb</code> with PROD hostname and so on.</p>

<p>Only one idea I found - is to check <code>$TRAVIS_BRANC</code> variable and then execute script, like:</p>

<pre><code>language: php
install:
  - true
script:
  - test $TRAVIS_BRANCH = "develop" &amp;&amp; ./ci/deploy.rb envdev.tld 
  - test $TRAVIS_BRANCH = "master" &amp;&amp; ./ci/deploy.rb envprod.tld
</code></pre>

<p>But this solution looks a bit weird as for me. Any other possibilities to realize that?</p>

<p>Any tips/links appreciated.</p>
