mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 14:03:22 +08: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:
parent
b07c70d843
commit
51b88c0e2c
|
@ -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]
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user