Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Amirault <4155490-marcel.amirault@users.noreply.gitlab.com>2021-04-30 16:48:37 +0300
committerMarcel Amirault <4155490-marcel.amirault@users.noreply.gitlab.com>2021-04-30 16:48:37 +0300
commit9211258b3e94b6fbcbe532cc108409138f5309c1 (patch)
tree51142eaf890bdd0c704aa857e06b97fe03d4392d
parentabb509c176825e4ad924d6a4fee3bc63f70649f0 (diff)
parentc461707a73ec550ebb1b3724317b882150badb53 (diff)
Merge branch 'ap-feature-flags-rakefile' into 'master'
Check if feature flags symlinks exist See merge request gitlab-org/gitlab-docs!1746
-rw-r--r--Rakefile19
1 files changed, 18 insertions, 1 deletions
diff --git a/Rakefile b/Rakefile
index d90044c9..fb5a8de4 100644
--- a/Rakefile
+++ b/Rakefile
@@ -112,6 +112,20 @@ end
desc 'Generates _data/feature_flags.yaml'
task :generate_feature_flags do
+
+ feature_flags_dir = File.join('tmp', 'feature_flags')
+ feature_flags_ee_dir = File.join('tmp', 'feature_flags-ee')
+
+ unless Dir.exist?(feature_flags_dir)
+ abort('The feature flags directory does not exist.
+ See https://gitlab.com/gitlab-org/gitlab-docs/-/blob/master/README.md#generate-the-feature-flag-tables')
+ end
+
+ unless Dir.exist?(feature_flags_ee_dir)
+ abort('The feature flags EE directory does not exist.
+ See https://gitlab.com/gitlab-org/gitlab-docs/-/blob/master/README.md#generate-the-feature-flag-tables')
+ end
+
paths = {
'GitLab Community Edition and Enterprise Edition' => File.join('tmp', 'feature_flags', '**', '*.yml'),
'GitLab Enterprise Edition only' => File.join('tmp', 'feature_flags-ee', '**', '*.yml')
@@ -129,7 +143,10 @@ task :generate_feature_flags do
end
end
- File.write(File.join('content', '_data', 'feature_flags.yaml'), feature_flags.to_yaml)
+ feature_flags_yaml = File.join('content', '_data', 'feature_flags.yaml')
+
+ puts "Generating #{feature_flags_yaml}"
+ File.write(feature_flags_yaml, feature_flags.to_yaml)
end
namespace :release do