diff options
author | Rémy Coutable <remy@rymai.me> | 2019-01-21 22:20:38 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2019-02-05 16:04:54 +0300 |
commit | 6b39f55d3f0ba0d48e920693c4d5128e26769a1c (patch) | |
tree | a55eae5d31118fa44d902a932ea638163356d3ed /lib/tasks/gitlab | |
parent | 31fc5965baf9ca23a1da4a0ffc350102fe4c89c6 (diff) |
Add cache to the 'compile-assets' and 'gitlab:assets:compile' jobs
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'lib/tasks/gitlab')
-rw-r--r-- | lib/tasks/gitlab/assets.rake | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/tasks/gitlab/assets.rake b/lib/tasks/gitlab/assets.rake index a42f02a84fd..7a42e4e92a0 100644 --- a/lib/tasks/gitlab/assets.rake +++ b/lib/tasks/gitlab/assets.rake @@ -1,13 +1,17 @@ namespace :gitlab do namespace :assets do desc 'GitLab | Assets | Compile all frontend assets' - task compile: [ - 'yarn:check', - 'gettext:po_to_json', - 'rake:assets:precompile', - 'webpack:compile', - 'fix_urls' - ] + task :compile do + require_dependency 'gitlab/task_helpers' + + %w[ + yarn:check + gettext:po_to_json + rake:assets:precompile + webpack:compile + gitlab:assets:fix_urls + ].each(&Gitlab::TaskHelpers.method(:invoke_and_time_task)) + end desc 'GitLab | Assets | Clean up old compiled frontend assets' task clean: ['rake:assets:clean'] |