Skip to content
Snippets Groups Projects
Commit 6ae9a652 authored by Philipp S. Sommer's avatar Philipp S. Sommer
Browse files

Rebuild the recipe without test for upload

parent 9c51791c
No related branches found
No related tags found
No related merge requests found
......@@ -3,24 +3,24 @@ import os
import re
import conda_build.api
import subprocess as spr
fnames = list(conda_build.api.get_output_file_paths(
os.path.join('ci', 'conda-recipe')))
py_patt = re.compile('py\d\d')
repl = 'py' + os.getenv('PYTHON_VERSION').replace('.', '')
fnames = [py_patt.sub(repl, f) for f in fnames]
recipe_path = 'ci/conda-recipe'
if os.getenv("TRAVIS") == "true":
branch = os.getenv("TRAVIS_BRANCH")
on_release = os.getenv("TRAVIS_TAG") != ""
else:
branch = os.getenv("APPVEYOR_REPO_BRANCH")
on_release = bool(os.getenv("APPVEYOR_REPO_TAG_NAME"))
label = ['-l', branch] if not on_release else []
token = ['-t', os.getenv('CONDA_REPO_TOKEN')]
print("Uploading via " +
" ".join(['anaconda -t *****', 'upload', '--force'] + label + fnames))
label = ['--label', branch] if not on_release else []
token = ['--token', os.getenv('CONDA_REPO_TOKEN')]
command = ["conda", "build", "--no-test", "--no-copy-test-source-files"]
spr.check_call(["conda", "config", "--set", "anaconda_upload", "yes"])
print("Building recipe via " +
" ".join(command + ["--token *******"] + label + [recipe_path]))
spr.check_call(
['anaconda'] + token + ['upload', '--force'] +
label + fnames
)
spr.check_call(command + token + label + [recipe_path])
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment