Skip to content

Commit fbea2b0

Browse files
committed
[skip ci] Fix documentation about snippet import.
1 parent 7bed39b commit fbea2b0

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

README.md

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,16 +39,24 @@ The easiest way to do it is to [import][travis-config-imports] the shared
3939
configuration snippet:
4040

4141
```yaml
42-
import: neimad/travis-python:dev.yml
42+
import:
43+
- source: neimad/travis-python:dev.yml
44+
mode: deep_merge_prepend
4345
```
4446
47+
**The imported configuration needs to be prepended** and **a deep merge is
48+
required** to be able use the installed Python distribution in the
49+
`before_install` and subsequent phases.
50+
4551
Read [the configuration documentation] to understand how it works.
4652

4753
Then, specify the wanted Python version using the `PYTHON` environment
4854
variable:
4955

5056
```yaml
51-
import: neimad/travis-python:dev.yml
57+
import:
58+
- source: neimad/travis-python:dev.yml
59+
mode: deep_merge_prepend
5260
5361
env:
5462
- PYTHON=3.8
@@ -58,7 +66,7 @@ env:
5866
By default, it will generate a build matrix using the three operating systems
5967
available on Travis CI (Linux, macOS and Windows).
6068

61-
The Python distribution is installed during the `pre-install` phase and
69+
The Python distribution is installed during the `before_install` phase and
6270
available using the `python` program name (whether it is Python 2 or 3).
6371

6472
Behind the scene

doc/Travis_Configuration.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,14 +36,14 @@ the current shell. But as macOS machines use Bash 3.2, sourcing from `stdin` is
3636
not supported:
3737

3838
```yaml
39-
pre-install:
39+
before_install:
4040
- source <(curl -sSL $url) # not supported on Bash 3.2
4141
```
4242

4343
So, the script is downloaded using `wget` then sourced:
4444

4545
```yaml
46-
pre-install:
46+
before_install:
4747
- wget https://raw.githubusercontent.com/neimad/travis-python/master/travis-python.bash
4848
- source travis-python.bash
4949
```
@@ -54,7 +54,7 @@ Finally, the Python distribution can be installed in the `$HOME/python`
5454
directory:
5555

5656
```yaml
57-
pre-install:
57+
before_install:
5858
- ...
5959
- install_python $HOME/python $PYTHON
6060
```

0 commit comments

Comments
 (0)