Fix outline icon caching
Summary: The build-release script was using different logic to construct the local url, than the lookup file. Changed so they both use the same function. And unit tests added. Reviewed By: passy Differential Revision: D17602476 fbshipit-source-id: 6aaedd58eafb2cc59adcdc0ebb4dd329bf99c33a
This commit is contained in:
committed by
Facebook Github Bot
parent
74b9ba5c40
commit
9d4cc64bc9
@@ -18,7 +18,11 @@ const {
|
||||
genMercurialRevision,
|
||||
} = require('./build-utils.js');
|
||||
const fetch = require('node-fetch');
|
||||
const {ICONS, getIconURL} = require('../src/utils/icons.js');
|
||||
const {
|
||||
ICONS,
|
||||
buildLocalIconPath,
|
||||
getIconURL,
|
||||
} = require('../src/utils/icons.js');
|
||||
|
||||
function generateManifest(versionNumber) {
|
||||
const filePath = path.join(__dirname, '..', 'dist');
|
||||
@@ -137,11 +141,7 @@ function downloadIcons(buildFolder) {
|
||||
res =>
|
||||
new Promise((resolve, reject) => {
|
||||
const fileStream = fs.createWriteStream(
|
||||
path.join(
|
||||
buildFolder,
|
||||
'icons',
|
||||
`${name}-${size}@${density}x.png`,
|
||||
),
|
||||
path.join(buildFolder, buildLocalIconPath(name, size, density)),
|
||||
);
|
||||
res.body.pipe(fileStream);
|
||||
res.body.on('error', reject);
|
||||
|
||||
Reference in New Issue
Block a user