Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Describe TRAVIS_GO_VERSION #2117

Merged
merged 1 commit into from
Nov 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions user/languages/go.md
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,19 @@ The version of Go a job is using is available as:
TRAVIS_GO_VERSION
```

Please note that this will expand to the real Go version, for example `1.7.4`,
also when `go: 1.7.x` was specified. Comparing this value in for example the
deploy section could look like this:
This may contain `.x` at the end, as described above.
Use of this variable in the deployment condition should
take this possibility into consideration.
For example:

```yaml
go:
- 1.7.x
deploy:
...
on:
condition: $TRAVIS_GO_VERSION =~ ^1\.7\.[0-9]+$
condition: $TRAVIS_GO_VERSION =~ ^1\.7
```
{: data-file=".travis.yml"}

Expand Down