Skip to content

Commit

Permalink
Fixing problem with anaconda trying to upload from pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
giacomov committed Jun 14, 2018
1 parent 002a8d7 commit 8d0b495
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions ci/build_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,16 @@ if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
fi

# If we are on the master branch upload to the channel
if [[ "$TRAVIS_BRANCH" == "master" ]]; then
conda install -c conda-forge anaconda-client
if [[ "${TRAVIS_EVENT_TYPE}" == "pull_request" ]]; then

echo "This is a pull request, not uploading to Conda channel"

anaconda -t $CONDA_UPLOAD_TOKEN upload -u threeml ${CONDA_BUILD_PATH}/*.tar.bz2 --force
else
echo "On a branch, not uploading to Conda channel"
fi

if [[ "${TRAVIS_EVENT_TYPE}" == "push" ]]; then

conda install -c conda-forge anaconda-client

anaconda -t $CONDA_UPLOAD_TOKEN upload -u threeml ${CONDA_BUILD_PATH}/*.tar.bz2 --force
fi
fi

0 comments on commit 8d0b495

Please sign in to comment.