diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-03 12:10:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-03 12:10:11 +0300 |
commit | f3189d2a01f0b44915b5d7a2301af1445f759c9f (patch) | |
tree | b2d476f044cd6fa9396771217a8c89089c424f57 /scripts | |
parent | 14c866bb2ff6550420257cee619828a7510433dc (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/used-feature-flags | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/scripts/used-feature-flags b/scripts/used-feature-flags index e6a8149da71..7d81e4b2cb2 100755 --- a/scripts/used-feature-flags +++ b/scripts/used-feature-flags @@ -27,7 +27,8 @@ flags_paths = [ ] # For EE additionally process `ee/` feature flags -if File.exist?('ee/app/models/license.rb') && !%w[true 1].include?(ENV['FOSS_ONLY'].to_s) +is_ee = File.exist?('ee/app/models/license.rb') && !%w[true 1].include?(ENV['FOSS_ONLY'].to_s) +if is_ee flags_paths << 'ee/config/feature_flags/**/*.yml' # Geo feature flags are constructed dynamically and there's no explicit checks in the codebase so we mark all @@ -41,6 +42,19 @@ if File.exist?('ee/app/models/license.rb') && !%w[true 1].include?(ENV['FOSS_ONL end end +# For JH additionally process `jh/` feature flags +is_jh = is_ee && Dir.exist?('jh') && !%w[true 1].include?(ENV['EE_ONLY'].to_s) +if is_jh + flags_paths << 'jh/config/feature_flags/**/*.yml' + + Dir.glob('jh/app/replicators/geo/*_replicator.rb').each_with_object(Set.new) do |path, memo| + replicator_name = File.basename(path, '.rb') + feature_flag_name = "geo_#{replicator_name.delete_suffix('_replicator')}_replication" + + FileUtils.touch(File.join('tmp', 'feature_flags', "#{feature_flag_name}.used")) + end +end + all_flags = {} additional_flags = Set.new |