Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow rake update:ui to work without db connection #1887

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion lib/tasks/manageiq/ui_tasks.rake
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,22 @@ namespace :update do
end
end

task :ui => ['update:bower', 'update:yarn', 'webpack:compile']
task :ui do
Rake::Task['update:bower'].invoke
Rake::Task['update:yarn'].invoke

# When available, run the `webpack:compile` tasks without a fully loaded
# environment, since when doing an appliance/docker build, a database isn't
# available for the :environment task (prerequisite for
# 'webpacker:compile') to function.
if defined?(EvmRakeHelper)
EvmRakeHelper.with_dummy_database_url_configuration do
Rake::Task['webpack:compile'].invoke
end
else
Rake::Task['webpack:compile'].invoke
end
end
end

namespace :webpack do
Expand Down Expand Up @@ -46,6 +61,7 @@ if Rake::Task.task_defined?("assets:precompile")
end
end
end

if Rake::Task.task_defined?("assets:clobber")
Rake::Task["assets:clobber"].enhance do
Rake::Task["webpack:clobber"].invoke
Expand Down