diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-19 14:50:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-19 14:50:12 +0300 |
commit | 6cd5b7dbfaa4ff630ecbbfe351a1faac5fc71a8d (patch) | |
tree | d3563b9f60936c18a02185e2e53b424bb1b83539 /lib/tasks | |
parent | b3e0658cb1fbc7c8e7dd381467c656f2e675ee46 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/ee_compat_check.rake | 4 | ||||
-rw-r--r-- | lib/tasks/gitlab/dev.rake | 31 | ||||
-rw-r--r-- | lib/tasks/lint.rake | 15 |
3 files changed, 12 insertions, 38 deletions
diff --git a/lib/tasks/ee_compat_check.rake b/lib/tasks/ee_compat_check.rake deleted file mode 100644 index f494fa5c5c2..00000000000 --- a/lib/tasks/ee_compat_check.rake +++ /dev/null @@ -1,4 +0,0 @@ -desc 'Checks if the branch would apply cleanly to EE' -task ee_compat_check: :environment do - Rake::Task['gitlab:dev:ee_compat_check'].invoke -end diff --git a/lib/tasks/gitlab/dev.rake b/lib/tasks/gitlab/dev.rake deleted file mode 100644 index 17d3ac74375..00000000000 --- a/lib/tasks/gitlab/dev.rake +++ /dev/null @@ -1,31 +0,0 @@ -namespace :gitlab do - namespace :dev do - desc 'Checks if the branch would apply cleanly to EE' - task :ee_compat_check, [:branch] => :environment do |_, args| - opts = - if ENV['CI'] - { - ce_project_url: ENV['CI_PROJECT_URL'], - branch: ENV['CI_COMMIT_REF_NAME'], - job_id: ENV['CI_JOB_ID'] - } - else - unless args[:branch] - puts "Must specify a branch as an argument".color(:red) - exit 1 - end - - args - end - - if File.basename(Rails.root) == 'gitlab' - puts "Skipping EE projects" - exit 0 - elsif Gitlab::EeCompatCheck.new(opts || {}).check - exit 0 - else - exit 1 - end - end - end -end diff --git a/lib/tasks/lint.rake b/lib/tasks/lint.rake index 2353b2dc659..9a5693e78a2 100644 --- a/lib/tasks/lint.rake +++ b/lib/tasks/lint.rake @@ -28,14 +28,23 @@ unless Rails.env.production? task :all do status = 0 - %w[ + tasks = %w[ config_lint lint:haml scss_lint gettext:lint - gettext:updated_check lint:static_verification - ].each do |task| + ] + + if Gitlab.ee? + # This task will fail on CE installations (e.g. gitlab-org/gitlab-foss) + # since it will detect strings in the locale files that do not exist in + # the source files. To work around this we will only enable this task on + # EE installations. + tasks << 'gettext:updated_check' + end + + tasks.each do |task| pid = Process.fork do puts "*** Running rake task: #{task} ***" |