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:
David Taylor 2022-02-10 19:00:47 +00:00 committed by GitHub
parent b07c70d843
commit 51b88c0e2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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]