Build legacy frontend in assets precompile, not postinstall

This would otherwise break on packager because bundle is not ready there
pull/6346/head
Oliver Günther 6 years ago
parent 3534fb0b38
commit 37c1e23797
No known key found for this signature in database
GPG Key ID: 88872239EB414F99
  1. 8
      lib/tasks/assets.rake

@ -48,12 +48,20 @@ namespace :assets do
task :angular do
OpenProject::Assets.clear!
puts "Building angular frontend"
Dir.chdir Rails.root.join('frontend') do
sh '$(npm bin)/ng build --prod' do |ok, res|
raise "Failed to compile angular frontend: #{res.exitcode}" if !ok
end
end
puts "Building legacy frontend"
Dir.chdir Rails.root.join('frontend') do
sh 'npm run legacy-webpack' do |ok, res|
raise "Failed to compile angular frontend: #{res.exitcode}" if !ok
end
end
puts "Writing angular assets manifest"
OpenProject::Assets.rebuild_manifest!
end

Loading…
Cancel
Save