Skip to content

Commit

Permalink
Merge pull request #634 from brave/exception-exceptions-manifest
Browse files Browse the repository at this point in the history
Generate manifest file for exception-exceptions list
  • Loading branch information
antonok-edm authored Jun 13, 2023
2 parents 2f97708 + 0af88e3 commit e0971cc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/generateManifestForRustAdblock.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@ const defaultPlaintextPubkey =
'q+SDNXROG554RnU4BnDJaNETTkDTZ0Pn+rmLmp1qY5Si0yGsfHkrv3FS3vdxVozO' +
'PQIDAQAB'

const exceptionPlaintextComponentId = 'adcocjohghhfpidemphmcmlmhnfgikei'
const exceptionPlaintextPubkey =
'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtvmLp4MOseThuH/vFSc7' +
'kjr+CDCzR/ieGI8TJZyFQhzA1SKWRl4y0wB+HGkmoq0KPOzKNZq6hxK7jdm/r/nx' +
'xOjqutPoUEL+ysxePErMTse2XeWu3psGSTEjPFdQTPEwH8MF2SwXXneOraD0V/GS' +
'iCCvlx8yKIXNX7V9ujMo+QoD6hPGslKUZQJAg+OaZ7pAfq5cOuWXNN6jv12UL0eM' +
't6Dhl31yEu4kZWeTkiccHqdlB/KvPiqXTrV+qd3Tjvsk6kmUlexu3/zlOwVDz5H/' +
'kPuOGvW7kYaW22NWQ9TH6fjffgVcSgHDbZETDiP8fHd76kyi1SZ5YJ09XHTE+i9i' +
'kQIDAQAB'

const generateManifestFile = async (name, base64PublicKey, uuid) => {
const manifest = '{\n' +
' "description": "Brave Ad Block Updater extension",\n' +
Expand All @@ -47,6 +57,9 @@ const generateManifestFileForDefaultAdblock =
const generateManifestFileForDefaultPlaintextAdblock =
generateManifestFile.bind(null, 'Default (plaintext)', defaultPlaintextPubkey, defaultPlaintextComponentId)

const generateManifestFileForExceptionAdblock =
generateManifestFile.bind(null, 'Exception-exceptions (plaintext)', exceptionPlaintextPubkey, exceptionPlaintextComponentId)

const generateManifestFileForRegionalCatalog =
generateManifestFile.bind(null, 'Regional Catalog', regionalCatalogPubkey, regionalCatalogComponentId)

Expand All @@ -65,6 +78,7 @@ const generateManifestFilesForAllRegions = async () => {

generateManifestFileForDefaultAdblock()
.then(generateManifestFileForDefaultPlaintextAdblock)
.then(generateManifestFileForExceptionAdblock)
.then(generateManifestFileForRegionalCatalog)
.then(generateManifestFileForResources)
.then(generateManifestFilesForAllRegions)
Expand Down

0 comments on commit e0971cc

Please sign in to comment.