()
| 92 | } |
| 93 | |
| 94 | async function checkForBuildIssues() { |
| 95 | // Ensure the version number is properly formed. |
| 96 | const chromeManifest = await parseManifestFile(); |
| 97 | const version = chromeManifest["version"]; |
| 98 | const versionRegexp = /^\d\.\d+\.\d+$/; |
| 99 | if (!versionRegexp.test(version)) { |
| 100 | throw new Error(`The version string "${version}" is malformed.`); |
| 101 | } |
| 102 | |
| 103 | // Ensure debug logging is turned off. |
| 104 | const text = await Deno.readTextFile("./lib/utils.js"); |
| 105 | if (!text.includes("debug: false")) { |
| 106 | throw new Error( |
| 107 | "It looks like debug logging is turned on in lib/utils.js. " + |
| 108 | "It should be off in builds for the store.", |
| 109 | ); |
| 110 | } |
| 111 | } |
| 112 | |
| 113 | // Builds a zip file for submission to the Chrome and Firefox stores. The output is in dist/. |
| 114 | async function buildStorePackage() { |
no test coverage detected