mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Ensure Ember CLI sourcemaps are uploaded to S3 (#15893)
Ember CLI gives sourcemaps their own digest. Our `s3.rake` logic assumes that the digest portion of sourcemap filenames remains the same.
The Ember CLI sourcemaps are included in the manifest file, so we can ensure they are uploaded by letting them past the MiniMime check.
Followup to abefb1beff
This commit is contained in:
@@ -59,9 +59,9 @@ def assets
|
||||
fullpath = (Rails.root + "public/assets/#{path}").to_s
|
||||
|
||||
# Ignore files we can't find the mime type of, like yarn.lock
|
||||
if mime = MiniMime.lookup_by_filename(fullpath)
|
||||
content_type = mime.content_type
|
||||
|
||||
content_type = MiniMime.lookup_by_filename(fullpath)&.content_type
|
||||
content_type ||= "application/json" if fullpath.end_with?(".map")
|
||||
if content_type
|
||||
asset_path = "assets/#{path}"
|
||||
results << [fullpath, asset_path, content_type]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user