Skip to content

Commit feffc7a

Browse files
committed
Updated conda build scripts and added new badge to readme
1 parent 4146186 commit feffc7a

File tree

5 files changed

+50
-23
lines changed

5 files changed

+50
-23
lines changed

.ci/travis_build_conda.sh

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,36 @@
44
set -e -x
55

66
if [ $TRAVIS_PYTHON_VERSION == 3.6 ]; then
7+
if [ -z "$TRAVIS_TAG" ]; then
78

9+
python3 ./make_conda_recipe.py || exit 1
810

9-
python3 ./make_conda_recipe.py || exit 1
11+
# Switch to miniconda
12+
source "$HOME/miniconda/etc/profile.d/conda.sh"
13+
hash -r
14+
conda activate base
15+
conda config --set always_yes yes --set changeps1 no
16+
conda update -q conda
17+
conda install conda-build
18+
conda install anaconda-client
19+
conda info -a
20+
21+
conda config --add channels domdfcoding || exit 1
22+
23+
conda config --add channels conda-forge || exit 1
24+
25+
conda build conda --output-folder conda/dist --skip-existing
1026

11-
# Switch to miniconda
12-
source "$HOME/miniconda/etc/profile.d/conda.sh"
13-
hash -r
14-
conda activate base
15-
conda config --set always_yes yes --set changeps1 no
16-
conda update -q conda
17-
conda install conda-build
18-
conda info -a
19-
20-
conda config --add channels domdfcoding || exit 1
21-
22-
conda config --add channels conda-forge || exit 1
23-
24-
conda build conda --output-folder conda/dist
27+
for f in conda/dist/noarch/domdf_python_tools-*.tar.bz2; do
28+
echo "$f"
29+
conda install $f || exit 1
30+
echo "Deploying to Anaconda.org..."
31+
anaconda -t $ANACONDA_TOKEN upload $f || exit 1
32+
echo "Successfully deployed to Anaconda.org."
33+
done
2534

35+
else
36+
echo "Deferring building conda package because this is not a tagged commit"
2637
else
2738
echo "Skipping building conda package because this is not the required runtime"
2839
fi

.ci/travis_deploy_conda.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,23 @@ set -e -x
55

66
if [ $TRAVIS_PYTHON_VERSION == 3.6 ]; then
77

8+
python3 ./make_conda_recipe.py || exit 1
9+
810
# Switch to miniconda
911
source "$HOME/miniconda/etc/profile.d/conda.sh"
1012
hash -r
1113
conda activate base
1214
conda config --set always_yes yes --set changeps1 no
15+
conda update -q conda
16+
conda install conda-build
1317
conda install anaconda-client
1418
conda info -a
19+
20+
conda config --add channels domdfcoding || exit 1
21+
22+
conda config --add channels conda-forge || exit 1
23+
24+
conda build conda --output-folder conda/dist
1525

1626
for f in conda/dist/noarch/domdf_python_tools-*.tar.bz2; do
1727
echo "$f"

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ python:
1111
install:
1212
- sudo apt-get update
1313

14-
- pip install rst2txt
14+
- pip install rst2txt yolk3k
1515
- pip install coveralls tox tox-travis
1616
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
1717
- bash miniconda.sh -b -p $HOME/miniconda

README.rst

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22
domdf_python_tools
33
**********************
44

5+
.. start shields
6+
57
.. image:: https://img.shields.io/travis/com/domdfcoding/domdf_python_tools/master?logo=travis
68
:target: https://travis-ci.com/domdfcoding/domdf_python_tools
7-
:alt: Build Status
9+
:alt: Travis Build Status
810
.. image:: https://readthedocs.org/projects/domdf_python_tools/badge/?version=latest
911
:target: https://domdf_python_tools.readthedocs.io/en/latest/?badge=latest
1012
:alt: Documentation Status
@@ -21,8 +23,12 @@ domdf_python_tools
2123
:target: https://coveralls.io/github/domdfcoding/domdf_python_tools?branch=master
2224
:alt: Coverage
2325
.. image:: https://img.shields.io/badge/License-LGPL%20v3-blue.svg
24-
:alt: PyPI - License
26+
:alt: License
2527
:target: https://github.com/domdfcoding/domdf_python_tools/blob/master/LICENSE
28+
.. image:: https://img.shields.io/github/languages/top/domdfcoding/domdf_python_tools
29+
:alt: GitHub top language
30+
31+
.. end shields
2632
2733
2834

lint_roller.sh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,23 @@ declare -a warnings=(
1313
E703 E711 E712 E713 E714 E721 W503 W504
1414
)
1515

16-
if [ -z "$(git status --porcelain --untracked-files=no)" ] || [ $1 == "-f" ]; then
16+
if [ -z "$(git status --porcelain --untracked-files=no)" ] || [ "$1" == "-f" ]; then
1717
# Working directory clean
1818

1919
for error in "${errors[@]}"
2020
do
2121
echo "Correcting $error"
2222
autopep8 --in-place --select "$error" -a --recursive domdf_python_tools/
23-
flake8 --select "$error" domdf_python_tools/
23+
>&2 flake8 --select "$error" domdf_python_tools/
2424
autopep8 --in-place --select "$error" -a --recursive tests/
25-
flake8 --select "$error" tests/
25+
>&2 flake8 --select "$error" tests/
2626

2727
done
2828

2929
for warning in "${warnings[@]}"; do
3030
echo "Searching for $warning"
31-
flake8 --select "$warning" domdf_python_tools/
32-
flake8 --select "$warning" tests/
31+
>&2 flake8 --select "$warning" domdf_python_tools/
32+
>&2 flake8 --select "$warning" tests/
3333
done
3434

3535
exit 0

0 commit comments

Comments
 (0)