Skip to content
This repository has been archived by the owner on Dec 9, 2022. It is now read-only.

Auto cf #256

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions scripts/cf_recipe_update.xsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import os
from contextlib import contextmanager

import requests

@contextmanager
def indir(d):
"""Context manager for temporarily entering into a directory."""
old_d = os.getcwd()
![cd @(d)]
yield
![cd @(old_d)]
for d in ['../recipes-dev', '../recipes-tag']:
with indir(d):
a = g`*`
t = 'https://raw.githubusercontent.com/conda-forge/{}-feedstock/' \
'master/recipe/meta.yaml'
for b in a:
os.makedirs(b, exist_ok=True)
with indir(b):
url = t.format(b)
request = requests.get(url)
if request.status_code == 200:
# TODO: pull all contents of the recipe folder
# TODO: remove all contents of the recipe folder
if 'meta.yaml' in g`*`:
rm meta.yaml
wget @(url)

26 changes: 26 additions & 0 deletions totally_not_a_travis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
sudo: False

language: python

matrix:
include:
- python: 3.6

install:
# Install conda
- wget http://repo.continuum.io/miniconda/Miniconda-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- conda config --set always_yes yes --set changeps1 no
- conda update conda

# Install dependencies
- conda install xonsh requests doctr

script:
- set -e
- cd scripts
# update all the things
- xonsh cf_recipe_udate.xsh
# push the updated recipes to GH
- doctr deploy . --built-docs . --deploy-branch-name build_me