simplify test for contexts (is now by default an empty list)

pull/457/head
nuest 2018-10-30 16:24:43 +01:00
rodzic 12b4457437
commit c843e25f16
1 zmienionych plików z 12 dodań i 13 usunięć

Wyświetl plik

@ -239,19 +239,18 @@ class RBuildPack(PythonBuildPack):
),
]
if self.stencila_manifest_contexts:
if "r" in self.stencila_manifest_contexts:
scripts += [
(
"${NB_USER}",
# Install and register stencila library
r"""
R --quiet -e "source('https://bioconductor.org/biocLite.R'); biocLite('graph')" && \
R --quiet -e "devtools::install_github('stencila/r', ref = '361bbf560f3f0561a8612349bca66cd8978f4f24')" && \
R --quiet -e "stencila::register()"
"""
),
]
if "r" in self.stencila_contexts:
scripts += [
(
"${NB_USER}",
# Install and register stencila library
r"""
R --quiet -e "source('https://bioconductor.org/biocLite.R'); biocLite('graph')" && \
R --quiet -e "devtools::install_github('stencila/r', ref = '361bbf560f3f0561a8612349bca66cd8978f4f24')" && \
R --quiet -e "stencila::register()"
"""
),
]
return super().get_build_scripts() + scripts