VulpesOS/gaia/build/post-manifest.js
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

33 lines
872 B
JavaScript
Executable file

'use strict';
/**
* Updates manifest.webapp
*/
var utils = require('./utils');
function execute(options) {
var webapp = options.webapp;
if (utils.isExternalApp(webapp)) {
return;
}
var buildManifestFile = utils.getFile(webapp.buildManifestFilePath);
var manifest = utils.getJSON(buildManifestFile);
// Forces the presence of `origin` field in order to help WebIDE overriding
// the app, with the same origin.
manifest.origin = webapp.url;
// Get the Gaia version and set it as an app version in manifest.webapp.
// It's used by Langpack API
var settingsFile = utils.getFile(options.GAIA_DIR, 'build', 'config',
'common-settings.json');
var settings = utils.getJSON(settingsFile);
manifest.version = settings['langpack.channel'];
utils.writeContent(buildManifestFile, JSON.stringify(manifest));
}
exports.execute = execute;