diff options
Diffstat (limited to 'lib/helpers/generic.rb')
-rw-r--r-- | lib/helpers/generic.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/helpers/generic.rb b/lib/helpers/generic.rb index 564118e8..c9254368 100644 --- a/lib/helpers/generic.rb +++ b/lib/helpers/generic.rb @@ -37,5 +37,14 @@ module Nanoc::Helpers ENV['CI_COMMIT_REF_NAME'] end end + + # + # Check if CI_PROJECT_NAME is 'gitlab-docs', or nil which implies + # local development. This can be used to skip portions that we + # don't want to render in one of the upstream products. + # + def gitlab_docs_or_local? + ENV['CI_PROJECT_NAME'] == 'gitlab-docs' or ENV['CI_PROJECT_NAME'].nil? + end end end |