-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #79 from jchodera/master
Update after_success script to fix anaconda cloud push
- Loading branch information
Showing
1 changed file
with
32 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |