Version Variables
Version are exposed during build using the {{versions.VERSIONING_SCHEME}}
variable.
For example stack
versioning variables are exposed as {{versions.stack}}
.
Besides the current version, the following suffixes are available:
Version substitution | result | purpose |
---|---|---|
{{version.stack}} |
9.0.4 | Current version |
{{version.stack.base}} |
9.0.0 | The first version on the new doc system |
Using specialized mutation operators versions can be printed in any kind of ways.
Version substitution | result |
---|---|
{{version.stack| M.M}} |
9.0 |
{{version.stack.base | M }} |
9 |
{{version.stack | M+1 | M }} |
10 |
{{version.stack.base | M.M+1 }} |
9.1.0 |
Mutation operators also work correctly in links and code blocks, making them versatile for various documentation contexts.
Mutation operators can be used in both link URLs and link text:
[Download version {{version.stack | M.M}}](https://download.elastic.co/{{version.stack | M.M}}/elasticsearch.tar.gz)
[Latest major version](https://elastic.co/guide/en/elasticsearch/reference/{{version.stack | M}}/index.html)
Which renders as:
Download version 9.0 Latest major version
Mutation operators work in enhanced code blocks when subs=true
is specified:
```bash subs=true
curl -X GET "localhost:9200/_cluster/health?v&pretty"
echo "Elasticsearch {{version.stack | M.M}} is running"
```
Which renders as:
curl -X GET "localhost:9200/_cluster/health?v&pretty"
echo "Elasticsearch 9.0 is running"
Mutation operators are robust and handle whitespace around the pipe character correctly:
Syntax | Result | Notes |
---|---|---|
{{version.stack|M.M}} |
9.0 | No spaces |
{{version.stack | M.M}} |
9.0 | Spaces around pipe |
{{version.stack |M.M}} |
9.0 | Space before pipe |
{{version.stack| M.M}} |
9.0 | Space after pipe |
This is dictated by the versions.yml
configuration file
stack
ece
ech
eck
ess
self
ecctl
curator
security
apm_agent_android
apm_agent_ios
apm_agent_dotnet
apm_agent_go
apm_agent_java
apm_agent_node
apm_agent_php
apm_agent_python
apm_agent_ruby
apm_agent_rum
edot_ios
edot_android
edot_dotnet
edot_java
edot_node
edot_php
edot_python
edot_cf_aws
edot_collector
The following are available but should not be used. These map to serverless projects and have a fixed high version number.
all
ech
ess
(This is deprectated but was added for backwards-compatibility.)serverless
elasticsearch
observability