diff --git a/docs/update.json b/docs/update.json index feef7650fa..c0f815da8c 100755 --- a/docs/update.json +++ b/docs/update.json @@ -2,12 +2,24 @@ "addons": { "sieve@mozdev.org": { "updates": [ + { + "version": "0.5.2", + "update_link": "https://github.com/thsmi/sieve/releases/download/0.5.2/sieve-0.5.2.xpi", + "update_info_url": "https://github.com/thsmi/sieve/releases/tag/0.5.2", + "browser_specific_settings": { + "gecko": { + "strict_min_version": "68.0a1" + } + } + }, { "version": "0.5.1", "update_link": "https://github.com/thsmi/sieve/releases/download/0.5.1/sieve-0.5.1.xpi", "update_info_url": "https://github.com/thsmi/sieve/releases/tag/0.5.1", "browser_specific_settings": { - "gecko": { "strict_min_version": "68.0a1" } + "gecko": { + "strict_min_version": "68.0a1" + } } }, { @@ -15,7 +27,9 @@ "update_link": "https://github.com/thsmi/sieve/releases/download/0.5.0/sieve-0.5.0.xpi", "update_info_url": "https://github.com/thsmi/sieve/releases/tag/0.5.0", "browser_specific_settings": { - "gecko": { "strict_min_version": "68.0a1" } + "gecko": { + "strict_min_version": "68.0a1" + } } }, { @@ -23,7 +37,9 @@ "update_link": "https://github.com/thsmi/sieve/releases/download/0.4.2/sieve-0.4.2.xpi", "update_info_url": "https://github.com/thsmi/sieve/releases/tag/0.4.2", "browser_specific_settings": { - "gecko": { "strict_min_version": "68.0a1" } + "gecko": { + "strict_min_version": "68.0a1" + } } }, { @@ -79,4 +95,4 @@ ] } } -} +} \ No newline at end of file diff --git a/gulp/gulpfile.common.js b/gulp/gulpfile.common.js index 7294bbc906..5a9c203108 100644 --- a/gulp/gulpfile.common.js +++ b/gulp/gulpfile.common.js @@ -267,6 +267,28 @@ async function bumpPatchVersion() { await setPackageVersion(pkgVersion, './package.json'); } +/** + * Updates the manifest which is used by the apps as well as the WXs + * automatic update checker. + */ +async function updateVersion() { + + const version = (await getPackageVersion()).join("."); + + const data = JSON.parse(await readFile("./docs/update.json", 'utf8')); + + data["addons"]["sieve@mozdev.org"]["updates"].unshift({ + "version" : version, + "update_link": `https://github.com/thsmi/sieve/releases/download/${version}/sieve-${version}.xpi`, + "update_info_url": `https://github.com/thsmi/sieve/releases/tag/${version}`, + "browser_specific_settings": { + "gecko": { "strict_min_version": "68.0a1" } + } + }); + + await writeFile("./docs/update.json", JSON.stringify(data, null, JSON_INDENTATION), 'utf-8'); +} + /** * Compresses the given file or directory recursively. * @@ -377,6 +399,8 @@ exports["bumpMajorVersion"] = bumpMajorVersion; exports["bumpMinorVersion"] = bumpMinorVersion; exports["bumpPatchVersion"] = bumpPatchVersion; +exports["updateVersion"] = updateVersion; + exports["BASE_DIR_BUILD"] = BASE_DIR_BUILD; exports["BASE_DIR_COMMON"] = BASE_DIR_COMMON; diff --git a/gulpfile.js b/gulpfile.js index b44273f4de..ed8ef35411 100755 --- a/gulpfile.js +++ b/gulpfile.js @@ -93,6 +93,7 @@ exports["bump-patch"] = series( common.bumpPatchVersion, parallel( app.updateVersion, - wx.updateVersion + wx.updateVersion, + common.updateVersion ) ); diff --git a/package.json b/package.json index 31ae8d2747..37acbe0672 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sieve", - "version": "0.5.1", + "version": "0.5.2", "description": "Configures server-side sieve email filters", "directories": { "doc": "docs", diff --git a/src/wx/manifest.json b/src/wx/manifest.json index 9af2868a92..2a6b6c966e 100644 --- a/src/wx/manifest.json +++ b/src/wx/manifest.json @@ -1,7 +1,7 @@ { "name": "Sieve", "description": "Manages Sieve Message Filters", - "version": "0.5.1", + "version": "0.5.2", "icons": { "64": "libs/icons/linux.png" },