From 6fe8f1649b06207df2afb5b33c22914d80bc6158 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Thu, 6 Feb 2020 14:44:20 -0500 Subject: [PATCH] [DOCS] Include docs on permanently unreleased branches only (#51743) Adds the ability to display docs on permanently unreleased branches, such as `master` and `7.x`. Also updates how the autoscaling and EQL docs are included. Currently, these feature-flag docs would display on any unreleased branches that contain the changes, such as 7.7. --- docs/Versions.asciidoc | 10 ++++++++++ docs/reference/index.asciidoc | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/Versions.asciidoc b/docs/Versions.asciidoc index d2bee689738..8f58ae3afc5 100644 --- a/docs/Versions.asciidoc +++ b/docs/Versions.asciidoc @@ -58,6 +58,16 @@ endif::[] :javadoc-license: {rest-high-level-client-javadoc}/org/elasticsearch/protocol/xpack/license :javadoc-watcher: {rest-high-level-client-javadoc}/org/elasticsearch/protocol/xpack/watcher +/////// +Permanently unreleased branches (master, n.X) +/////// +ifeval::["{source_branch}"=="master"] +:permanently-unreleased-branch: +endif::[] +ifeval::["{source_branch}"=="{major-version}"] +:permanently-unreleased-branch: +endif::[] + /////// Shared attribute values are pulled from elastic/docs /////// diff --git a/docs/reference/index.asciidoc b/docs/reference/index.asciidoc index 6dc0c88a10b..6ecb6a7b856 100644 --- a/docs/reference/index.asciidoc +++ b/docs/reference/index.asciidoc @@ -44,7 +44,7 @@ include::ingest.asciidoc[] include::ilm/index.asciidoc[] -ifeval::["{release-state}"=="unreleased"] +ifdef::permanently-unreleased-branch[] include::autoscaling/index.asciidoc[]