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

Only add "Updating Bazel" link on master or > 0.28 docs. #9057

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
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
13 changes: 12 additions & 1 deletion site/_layouts/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@
<!-- /versions/0.12.3/baz.md -> ["0.12.3", "baz.md"] -->
{% assign versioned_url_parts = page.url | split: '/' | shift | shift %}
{% assign current_version = versioned_url_parts.first %}
{% assign version_components = current_version | split: '.' %}
{% if version_components.size < 2 %}
{% assign major_version = "master" %}
{% assign minor_version = "master" %}
{% else % }
{% assign minor_version = version_components[0] %}
{% assign minor_version = version_components[1] %}
{% endif %}

<!DOCTYPE html>
<html lang="en" itemscope itemtype="https://schema.org/WebPage">
Expand Down Expand Up @@ -68,9 +76,11 @@ <h3>Installing and Using Bazel</h3>
</ul>
</li>

{% if major_version == "master" or major_version > 0 or minor_version > 28 %}
<li class="sidebar-nav">
<a href="/versions/{{ current_version }}/updating-bazel.html">Updating Bazel</a>
</li>
{% endif %}

<li>
<a class="sidebar-nav-heading" data-toggle="collapse"
Expand Down Expand Up @@ -189,7 +199,8 @@ <h3>Rules</h3>
</ul>
</li>

<li>
<li>{% assign minor_version = version_components[0] %}
dslomov marked this conversation as resolved.
Show resolved Hide resolved

<a class="sidebar-nav-heading" data-toggle="collapse"
href="#cpp-menu" aria-expanded="false"
aria-controls="cpp-menu">
Expand Down