diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2021-04-26 11:19:55 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2021-04-26 11:27:29 +0300 |
commit | 767c7ff6f69b7b81ff52c56ae55e80818526a794 (patch) | |
tree | 4b508d54b50a9fd551142eec4250d5aab7628096 /layouts/feature_flags_table.md.erb | |
parent | 93396cb5ed66de6f3ada206cfc9243846086343c (diff) |
Skip feature flags generation if yaml is absent
Feature flags are generated dynamically when
`content/_data/feature_flags.yaml` is present.
For upstream projects where this file is not
present (for example when testing the HTML links
in `gitlab-org/gitlab`), Nanoc will fail when
building the site. By skipping the addition of
the feature flags content in `ee/user/feature_flags.md`,
Nanoc can build the site successfully.
Diffstat (limited to 'layouts/feature_flags_table.md.erb')
-rw-r--r-- | layouts/feature_flags_table.md.erb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/layouts/feature_flags_table.md.erb b/layouts/feature_flags_table.md.erb index 4aed2dfa..a3b7f2e2 100644 --- a/layouts/feature_flags_table.md.erb +++ b/layouts/feature_flags_table.md.erb @@ -13,6 +13,7 @@ def disabled_count(ffs) ffs.count { |ff| !ff[:default_enabled] } end %> +<% if File.exist?(feature_flags_yaml.to_s) %> ## Available feature flags The feature flags available to you depend on: @@ -66,3 +67,4 @@ GitLab features [are delivered](https://about.gitlab.com/handbook/engineering/re |-----------|-------|---------|----------| <% ff_milestones.each do |milestone, ffs| %> | <%= milestone %> | <%= ffs.count %> | <%= enabled_count(ffs) %> | <%= disabled_count(ffs) %> | <% end %> +<% end %> |