Skip to content

Commit

Permalink
391 bump version to 5.0.2 (#392)
Browse files Browse the repository at this point in the history
* Bump version to 0.5.2
* Add gulp methods to bump update manifest.
  • Loading branch information
thsmi authored Sep 13, 2020
1 parent 45d140a commit 87fbba6
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 7 deletions.
24 changes: 20 additions & 4 deletions docs/update.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,44 @@
"addons": {
"[email protected]": {
"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"
}
}
},
{
"version": "0.5.0",
"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"
}
}
},
{
"version": "0.4.2",
"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"
}
}
},
{
Expand Down Expand Up @@ -79,4 +95,4 @@
]
}
}
}
}
24 changes: 24 additions & 0 deletions gulp/gulpfile.common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"]["[email protected]"]["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.
*
Expand Down Expand Up @@ -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;

Expand Down
3 changes: 2 additions & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ exports["bump-patch"] = series(
common.bumpPatchVersion,
parallel(
app.updateVersion,
wx.updateVersion
wx.updateVersion,
common.updateVersion
)
);
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sieve",
"version": "0.5.1",
"version": "0.5.2",
"description": "Configures server-side sieve email filters",
"directories": {
"doc": "docs",
Expand Down
2 changes: 1 addition & 1 deletion src/wx/manifest.json
Original file line number Diff line number Diff line change
@@ -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"
},
Expand Down

0 comments on commit 87fbba6

Please sign in to comment.