Skip to content

Commit 7cbde1c

Browse files
authored
Merge pull request #344 from dpryan79/check_channels
Expose check_channels on the CLI and check the first 2 by default.
2 parents 165b55d + 050dd6a commit 7cbde1c

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

bioconda_utils/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ def build_recipes(
268268

269269
if check_channels is None:
270270
if config['channels']:
271-
check_channels = [config['channels'][0]]
271+
check_channels = config['channels'][:2]
272272
else:
273273
check_channels = []
274274

bioconda_utils/cli.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,11 @@ def lint(recipe_folder, config, packages="*", cache=None, list_funcs=False,
318318
help='''Only run this linting function. Can be used multiple times.''')
319319
@arg('--lint-exclude', nargs='+',
320320
help='''Exclude this linting function. Can be used multiple times.''')
321+
@arg('--check-channels', nargs='+',
322+
help='''Channels to check recipes against before building. Any recipe
323+
already present in one of these channels will be skipped. The default is
324+
the first two channels specified in the config file. Note that this is
325+
ignored if you specify --git-range.''')
321326
def build(
322327
recipe_folder,
323328
config,
@@ -336,6 +341,7 @@ def build(
336341
lint=False,
337342
lint_only=None,
338343
lint_exclude=None,
344+
check_channels=None,
339345
):
340346
utils.setup_logger('bioconda_utils', loglevel)
341347

@@ -412,6 +418,7 @@ def build(
412418
anaconda_upload=anaconda_upload,
413419
mulled_upload_target=mulled_upload_target,
414420
lint_args=lint_args,
421+
check_channels=check_channels,
415422
)
416423
exit(0 if success else 1)
417424

0 commit comments

Comments
 (0)