Skip to content

Commit

Permalink
Merge pull request #38 from mwcraig/fix-cron
Browse files Browse the repository at this point in the history
Try fixing the travis CRON jobs
  • Loading branch information
mwcraig committed Nov 4, 2019
2 parents d78f92b + d260986 commit 32136e8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,12 @@ script:

# This will fail if the package does not actually exist
- ls $CONDA_PACKAGE $WHEEL_PACKAGE
# This step copies the few things we need from conda-forge to the vpython
# channel.
- if [ $TRAVIS_EVENT_TYPE == "cron" ]; then
conda install -c astropy -c conda-forge extruder twine;
copy_packages vp_copy.yaml vpython;
git clone git://github.com/glue-viz/conda-sync.git;
mv conda-sync/sync.py .;
python drive_copy.py;
fi


Expand Down
27 changes: 27 additions & 0 deletions drive_copy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import os

import yaml
from binstar_client import Conflict

from sync import sync

FROM = 'conda-forge'
TO = 'vpython'


def main(requirements_path):
with open(requirements_path, 'rt') as f:
package_list = yaml.safe_load(f)

token = os.getenv('BINSTAR_TOKEN')

for package in package_list:
print(package['name'])
try:
sync(FROM, TO, package['name'], token, to_label='main')
except Conflict:
print('Skipping because of a conflict anaconda.org')


if __name__ == '__main__':
main('vp_copy.yaml')

0 comments on commit 32136e8

Please sign in to comment.