Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Commit

Permalink
Merge pull request #574 from Financial-Times/matth/filter-asset-manif…
Browse files Browse the repository at this point in the history
…est-properties

Filter asset manifest property values
  • Loading branch information
i-like-robots authored Jun 28, 2019
2 parents 424deb1 + 5e0a2cc commit 5eb021c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tasks/deploy-hashed-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ function task (opts) {
let assetHashes;

try {
console.log(process.cwd() + `/${directory}/assets-hashes.json`); // eslint-disable-line no-console
console.log(process.cwd() + `/${directory}/asset-hashes.json`); // eslint-disable-line no-console
assetHashes = require(process.cwd() + `/${directory}/asset-hashes.json`);
} catch(err) {
return Promise.reject('Must run `make build-production` before running `nbt deploy-hashed-assets`');
Expand All @@ -64,7 +64,9 @@ function task (opts) {

console.log('Deploying hashed assets to S3...'); // eslint-disable-line no-console

return Promise.all(Object.keys(assetHashes)
return Promise.all(
Object.keys(assetHashes)
.filter(file => typeof assetHashes[file] === 'string')
.map(file => {
const hashedName = assetHashes[file];
const key = 'hashed-assets/' + appName + '/' + hashedName;
Expand Down

0 comments on commit 5eb021c

Please sign in to comment.