Skip to content

Commit

Permalink
Merge pull request #79 from jchodera/master
Browse files Browse the repository at this point in the history
Update after_success script to fix anaconda cloud push
  • Loading branch information
jchodera committed Apr 12, 2016
2 parents 0c9da3a + 1890b50 commit 2b9a7d8
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions devtools/travis-ci/after_success.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,43 @@
#!/bin/bash
# Must be invoked with $PACKAGENAME

echo $TRAVIS_PULL_REQUEST $TRAVIS_BRANCH
PUSH_DOCS_TO_S3=false

if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
if [ "$TRAVIS_PULL_REQUEST" = true ]; then
echo "This is a pull request. No deployment will be done."; exit 0
fi


if [[ "$TRAVIS_BRANCH" != "master" ]]; then
if [ "$TRAVIS_BRANCH" != "master" ]; then
echo "No deployment on BRANCH='$TRAVIS_BRANCH'"; exit 0
fi


binstar -t $BINSTAR_TOKEN upload --force -u omnia -p ensembler-dev $HOME/miniconda/conda-bld/linux-64/ensembler-dev-*
# Deploy to binstar
conda install --yes anaconda-client jinja2
pushd .
cd $HOME/miniconda/conda-bld
FILES=*/${PACKAGENAME}-dev-*.tar.bz2
for filename in $FILES; do
anaconda -t $BINSTAR_TOKEN remove --force ${ORGNAME}/${PACKAGENAME}-dev/${filename}
anaconda -t $BINSTAR_TOKEN upload --force -u ${ORGNAME} -p ${PACKAGENAME}-dev ${filename}
done
popd

if [ $PUSH_DOCS_TO_S3 = true ]; then
# Create the docs and push them to S3
# -----------------------------------
conda install --yes pip
conda config --add channels $ORGNAME
conda install --yes `conda build devtools/conda-recipe --output`
pip install numpydoc s3cmd msmb_theme
conda install --yes `cat docs/requirements.txt | xargs`

conda list -e

(cd docs && make html && cd -)
ls -lt docs/_build
pwd
python devtools/ci/push-docs-to-s3.py
fi

0 comments on commit 2b9a7d8

Please sign in to comment.