Skip to content

Commit 1e89be0

Browse files
committed
Try fixing the travis CRON jobs
1 parent d78f92b commit 1e89be0

File tree

2 files changed

+33
-2
lines changed

2 files changed

+33
-2
lines changed

.travis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,12 @@ script:
7777
# This will fail if the package does not actually exist
7878
- ls $CONDA_PACKAGE $WHEEL_PACKAGE
7979
- if [ $TRAVIS_EVENT_TYPE == "cron" ]; then
80-
conda install -c astropy -c conda-forge extruder twine;
81-
copy_packages vp_copy.yaml vpython;
80+
# Repo below has the script that does the actually copying
81+
git clone git://github.com/glue-viz/conda-sync.git;
82+
# Move the key file to this directory
83+
mv conda-sync/sync.py .;
84+
# Do the copying
85+
python drive_copy.py;
8286
fi
8387

8488

drive_copy.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import os
2+
3+
import yaml
4+
from binstar_client import Conflict
5+
6+
from sync import sync
7+
8+
FROM = 'conda-forge'
9+
TO = 'vpython'
10+
11+
12+
def main(requirements_path):
13+
with open(requirements_path, 'rt') as f:
14+
package_list = yaml.safe_load(f)
15+
16+
token = os.getenv('BINSTAR_TOKEN')
17+
18+
for package in package_list:
19+
print(package['name'])
20+
try:
21+
sync(FROM, TO, package['name'], token, to_label='main')
22+
except Conflict:
23+
print('Skipping because of a conflict anaconda.org')
24+
25+
26+
if __name__ == '__main__':
27+
main('vp_copy.yaml')

0 commit comments

Comments
 (0)