Skip to content

Commit

Permalink
Add extensions script
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Nov 15, 2023
1 parent 5f434a7 commit c6c49cd
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions scripts/tw-pull.js
Original file line number Diff line number Diff line change
Expand Up @@ -315,12 +315,33 @@ const pullDesktop = async () => {
);
};

const pullExtensions = async () => {
const extensions = pathUtil.join(__dirname, '../../extensions');
if (!isDirectorySync(extensions)) {
console.log('Skipping extensions; could not find extensions.');
return;
}

const metadataTranslations = await pullResource('extension-metadata', 0);
fs.writeFileSync(
pathUtil.join(extensions, 'translations/extension-metadata.json'),
JSON.stringify(metadataTranslations, null, 4)
);

const runtimeTranslations = await pullResource('extensions', 0);
fs.writeFileSync(
pathUtil.join(extensions, 'translations/extension-runtime.json'),
JSON.stringify(runtimeTranslations, null, 4)
);
};

const pullEverything = async () => {
try {
console.log('DOWNLOADING from Transifex...');
await pullGui();
await pullPackager();
await pullDesktop();
await pullExtensions();
} catch (e) {
console.error(e);
process.exit(1);
Expand Down

0 comments on commit c6c49cd

Please sign in to comment.