diff options
author | Mike Greiling <mike@pixelcog.com> | 2017-01-26 16:33:07 -0600 |
---|---|---|
committer | Mike Greiling <mike@pixelcog.com> | 2017-01-27 15:21:30 -0600 |
commit | 642bcb4d7c22ea6688751455670080c81c1149d4 (patch) | |
tree | 26134e5b96dc096040b843ee029a293aa1054470 /lib/tasks | |
parent | 75663d101dd2bf367d6d8e0048f53afadbe1b5b4 (diff) | |
download | gitlab-ce-642bcb4d7c22ea6688751455670080c81c1149d4.tar.gz |
automatically correct CSS urls on assets:precompile
Diffstat (limited to 'lib/tasks')
-rw-r--r-- | lib/tasks/assets.rake | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake new file mode 100644 index 00000000000..aca2a318b31 --- /dev/null +++ b/lib/tasks/assets.rake @@ -0,0 +1,10 @@ +namespace :assets do + desc 'GitLab | Assets | Fix Absolute URLs in CSS' + task :precompile do + css_files = Dir['public/assets/*.css'] + css_files.each do | file | + puts "Fixing #{file}" + system "sed", "-i", "-e", 's/url(\([\"\']\?\)\/assets\//url(\1.\//g', file + end + end +end |