Release lite extension from actions

This commit is contained in:
Carlos Quintana
2022-06-03 14:39:31 +02:00
parent 6639f2abd7
commit b33110d0f4
5 changed files with 73 additions and 10 deletions
+20
View File
@@ -118,6 +118,26 @@ const config = {
jsonContent.browser_specific_settings.gecko.id = geckoId.replace('@', '-beta@');
}
if (process.env.LITE) {
// Remove "All sites" permissions
const PERMISSIONS_TO_REMOVE = [
"https://*/*",
"http://*/*"
];
const finalPermissions = [];
for (const perm of jsonContent.permissions) {
if (!PERMISSIONS_TO_REMOVE.includes(perm)) {
finalPermissions.push(perm);
}
}
jsonContent.permissions = finalPermissions;
// Change metadata
jsonContent.name = "SimpleLogin Without SL icon";
jsonContent.short_name = "SimpleLogin Without SL icon";
}
return JSON.stringify(jsonContent, null, 2);
},
},