Skip to content

Commit

Permalink
Rebuild the recipe without test for upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Chilipp committed Sep 30, 2020
1 parent c9fbfdb commit 23801d9
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions ci/deploy_anaconda.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,24 @@
import re
import conda_build.api
import subprocess as spr
fnames = list(conda_build.api.get_output_file_paths('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 comments on commit 23801d9

Please sign in to comment.