Skip to content

Commit 508439d

Browse files
committed
Trialling new .travis.yml layout
1 parent 0f145af commit 508439d

File tree

2 files changed

+43
-39
lines changed

2 files changed

+43
-39
lines changed

.ci/travis_deploy_conda.sh

Lines changed: 36 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,42 @@
44
set -e -x
55

66
if [ $TRAVIS_PYTHON_VERSION == 3.6 ]; then
7-
8-
python3 ./make_conda_recipe.py || exit 1
9-
10-
# Switch to miniconda
11-
source "$HOME/miniconda/etc/profile.d/conda.sh"
12-
hash -r
13-
conda activate base
14-
conda config --set always_yes yes --set changeps1 no
15-
conda update -q conda
16-
conda install conda-build
17-
conda install anaconda-client
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 -c domdfcoding -c conda-forge --output-folder conda/dist --skip-existing
25-
26-
for f in conda/dist/noarch/domdf_python_tools-*.tar.bz2; do
27-
[ -e "$f" ] || continue
28-
echo "$f"
29-
conda install $f || exit 1
30-
if [ -z "$TRAVIS_TAG" ]; then
31-
echo "Skipping deploy because this is not a tagged commit"
32-
else
33-
echo "Deploying to Anaconda.org..."
34-
anaconda -t $ANACONDA_TOKEN upload $f || exit 1
35-
echo "Successfully deployed to Anaconda.org."
36-
fi
37-
done
7+
if [ -z "$TRAVIS_TAG" ] && [ "$TRAVIS_COMMIT_MESSAGE" == "Bump Version*" ]; then
8+
echo "Deferring building conda package because this is release"
9+
else
10+
11+
python3 ./make_conda_recipe.py || exit 1
12+
13+
# Switch to miniconda
14+
source "$HOME/miniconda/etc/profile.d/conda.sh"
15+
hash -r
16+
conda activate base
17+
conda config --set always_yes yes --set changeps1 no
18+
conda update -q conda
19+
conda install conda-build
20+
conda install anaconda-client
21+
conda info -a
22+
23+
conda config --add channels domdfcoding || exit 1
24+
25+
conda config --add channels conda-forge || exit 1
26+
27+
conda build conda -c domdfcoding -c conda-forge --output-folder conda/dist --skip-existing
28+
29+
for f in conda/dist/noarch/domdf_python_tools-*.tar.bz2; do
30+
[ -e "$f" ] || continue
31+
echo "$f"
32+
conda install $f || exit 1
33+
if [ -z "$TRAVIS_TAG" ]; then
34+
echo "Skipping deploy because this is not a tagged commit"
35+
else
36+
echo "Deploying to Anaconda.org..."
37+
anaconda -t $ANACONDA_TOKEN upload $f || exit 1
38+
echo "Successfully deployed to Anaconda.org."
39+
fi
40+
done
41+
42+
fi
3843

3944
else
4045
echo "Skipping deploying conda package because this is not the required runtime"

.travis.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,12 @@ install:
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
18-
- chmod +x .ci/travis_build_conda.sh
1918
- chmod +x .ci/travis_deploy_conda.sh
2019

2120
script:
2221
- tox
2322
after_success:
2423
- coveralls
25-
- chmod +x .ci/travis_build_conda.sh
26-
- .ci/travis_build_conda.sh || travis_terminate 1;
2724

2825

2926
stages:
@@ -35,22 +32,24 @@ jobs:
3532
include:
3633
- stage: deploy_pypi
3734
python: "3.6"
38-
on:
39-
tags: true
40-
repo: domdfcoding/domdf_python_tools
35+
install: skip
36+
script: skip
4137
deploy:
38+
on:
39+
tags: true
40+
repo: domdfcoding/domdf_python_tools
4241
provider: pypi
43-
script: skip
4442
user: "DomDF"
4543
password:
4644
secure: GQVX7JKDfUWcHQzjmZ8yadF4eIM/AUaXu/Zl8U2hwhB6NavbzUayvMXalT+pfgZ6NaWFMPZOETlxv5d+hf98Io/5HIV4i1KB98ze90KXpUU2Icz7IdxWDWGhc36Vkhb7hU0HUfXLu8WxcxQCJB3t7uIB9SO36dh/cMayW5YvBy3HhluaTvgLax4nOJYjN/FJCgs9kTCBYrjJzheS0pgj37bXZCrB06H0bsxgnbaAiL8FiG6tgJLABDLfqPhtJgVRhtdYeuqGv31/OV0vkj1zG6bExp9ENQ4/5L7FijLRznW+DnsRJt6BdTBtxNxK+v1ZccTdVJzTzhoUH/TbXdI+qtBeatTYz880du7TujKoxfFxGZ9+bSaYURaClMHn7/Ndj7ioj5f51jLf8+BCEk3cWEfUL7yeKF6RBWLww6cFKQ9yDNOiXgrsndz6Oh535LV28rKXS1qeGBppMAv09RmR/YfHu+XMp5yWa+vDwjmrQDH7qEkA3wYYMfMRnwi9+LrOHtS7IqFkgbAXZPmh3C0X1UEqD4cuARcyD9FRU2PAXM1tBprxEFi1L/sv4O8KRP+I3jXXsBHTmzbWWVqXiySGOlX6R9vOma35WS3mkllS/Oz7IyhUtONrwpaLHnuBLKMgi+RnsoEYgLx6KgSXVSQ0JUZq8cP2yewC8nx626w675w=
4745
distributions: "sdist bdist_wheel"
4846
skip_existing: true
4947
- stage: deploy_conda
5048
python: "3.6"
49+
install: skip
50+
script: skip
5151
deploy:
5252
on:
53-
tags: true
5453
repo: domdfcoding/domdf_python_tools
5554
provider: script
5655
script: .ci/travis_deploy_conda.sh || travis_terminate 1;

0 commit comments

Comments
 (0)