Unverified Commit e1d205b3 authored by jlaura's avatar jlaura Committed by GitHub
Browse files

Updates .travis for branch dependent builds

Again, modifying in the repo in order to get Travis to do its thing.
parent da137da7
Loading
Loading
Loading
Loading
+19 −5
Original line number Diff line number Diff line
language: cpp
sudo: false

branches:
  only:
    - master
    - dev

matrix:
  include:
    - os: linux
@@ -47,5 +52,14 @@ after_success:
  - conda install -y -q conda-build anaconda-client 
  # Pull the libcsm for the build from our anaconda channel
  - conda config --add channels usgs-astrogeology
  - conda config --set anaconda_upload yes
  - conda build --token $CONDA_UPLOAD_TOKEN recipe -q
  - conda config --set anaconda_upload no
  - conda build recipe -q
  # Get the conda build output dir
  - builddir=(`conda build recipe --output`)
  # Label based on the branch and upload to anaconda.org
  - |
    if [ "$TRAVIS_BRANCH" == "master" ]; then
      anaconda -t="$CONDA_UPLOAD_TOKEN" upload $builddir --label main --force;
    elif [ "$TRAVIS_BRANCH" == "dev" ]; then
      anaconda -t="$CONDA_UPLOAD_TOKEN" upload $builddir --label dev --force;
    fi