deploy firefox beta releases to github pages, enable updates

This commit is contained in:
mini-bomba
2025-08-29 00:16:56 +02:00
parent 9bf892c377
commit bf68ce14c4
3 changed files with 73 additions and 9 deletions

View File

@@ -189,7 +189,8 @@ module.exports = env => {
new BuildManifest({
browser: env.browser,
pretty: env.mode === "production",
stream: env.stream
stream: env.stream,
autoupdate: env.autoupdate,
}),
new configDiffPlugin()
],
@@ -200,4 +201,4 @@ module.exports = env => {
}
};
};
};

View File

@@ -23,10 +23,13 @@ const schema = {
pretty: {
type: 'boolean'
},
steam: {
stream: {
type: 'string'
},
autoupdate: {
type: 'boolean',
}
}
}
};
class BuildManifest {
@@ -62,6 +65,11 @@ class BuildManifest {
}
}
if (this.options.autoupdate === true && this.options.browser.toLowerCase() === "firefox") {
const [owner, repo_name] = process.env.GITHUB_REPOSITORY.split("/");
manifest.browser_specific_settings.gecko.update_url = `https://${owner.toLowerCase()}.github.io/${repo_name}/updates.json`;
}
let result = JSON.stringify(manifest);
if (this.options.pretty) result = JSON.stringify(manifest, null, 2);
@@ -86,4 +94,4 @@ function mergeObjects(object1, object2) {
}
}
module.exports = BuildManifest;
module.exports = BuildManifest;