canvas-lms/lib/rake
Ahmad Amireh 581baf6e37 highlight dependencies in canvas:compile_assets
refs FOO-966

as we're working on extracting Gradebook into its own client_app, the
canvas:compile_assets rake task had to be adjusted to build it too, then
i realized that the canvas_quizzes app has to be built _before_ we
generate i18n phrases while Gradebook (and canvas) have to go _after_
that task

the rake task did not appreciate any more complexity, so instead I
tried to focus on making the dependencies between these sub-tasks
clearer and at the same time maintain the parallel execution

changes:

- it's now possible to build a specific client_app via rake tasks
- the symlink needed for canvas_quizzes client app is now restored
  correctly in case of a failure during the i18n rake task. Previously,
  you had to restore it by hand before running any of the tasks again
- in case a client_app does not implement a `script/build`, we call its
  "npm build" script instead (eg `yarn run build`)

test plan:

- run "RAILS_LOAD_ALL_LOCALES=1 rake canvas:compile_assets" before you
  check out the patch and note the time taken
- check out the patch and re-run the task, verify it still works and
  that the time taken is not longer than what it was (if anything, it
  should be a little faster since we're batching more work)

Change-Id: I65e675ceeea93643a1c679ff29039ed5ef71b53d
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/247902
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
2020-09-24 20:51:51 +00:00
..
task_graph.rb highlight dependencies in canvas:compile_assets 2020-09-24 20:51:51 +00:00