mirror of
https://github.com/element-hq/element-desktop
synced 2025-04-01 03:43:43 +02:00
Merge branch 'develop' into renovate/major-electron
This commit is contained in:
commit
484f04f185
11
.github/workflows/build_and_deploy.yaml
vendored
11
.github/workflows/build_and_deploy.yaml
vendored
@ -202,19 +202,12 @@ jobs:
|
|||||||
name: packages.element.io
|
name: packages.element.io
|
||||||
path: packages.element.io
|
path: packages.element.io
|
||||||
|
|
||||||
# Workaround for https://www.cloudflarestatus.com/incidents/t5nrjmpxc1cj
|
# Checksum algorithm specified as per https://developers.cloudflare.com/r2/examples/aws/aws-cli/
|
||||||
- uses: unfor19/install-aws-cli-action@e8b481e524a99f37fbd39fdc1dcb3341ab091367 # v1
|
|
||||||
if: needs.prepare.outputs.deploy == 'true'
|
|
||||||
with:
|
|
||||||
version: 2.22.35
|
|
||||||
verbose: false
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
- name: Deploy artifacts
|
- name: Deploy artifacts
|
||||||
if: needs.prepare.outputs.deploy == 'true'
|
if: needs.prepare.outputs.deploy == 'true'
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
aws s3 cp --recursive packages.element.io/ s3://$R2_BUCKET/$DEPLOYMENT_DIR --endpoint-url $R2_URL --region auto
|
aws s3 cp --recursive packages.element.io/ s3://$R2_BUCKET/$DEPLOYMENT_DIR --endpoint-url $R2_URL --region auto --checksum-algorithm CRC32
|
||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
|
||||||
|
1
.github/workflows/build_and_test.yaml
vendored
1
.github/workflows/build_and_test.yaml
vendored
@ -49,6 +49,7 @@ jobs:
|
|||||||
- linux
|
- linux
|
||||||
- windows
|
- windows
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: macOS Universal
|
- name: macOS Universal
|
||||||
|
2
.github/workflows/build_prepare.yaml
vendored
2
.github/workflows/build_prepare.yaml
vendored
@ -90,8 +90,6 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
|
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
|
||||||
# Workaround for https://www.cloudflarestatus.com/incidents/t5nrjmpxc1cj
|
|
||||||
AWS_REQUEST_CHECKSUM_CALCULATION: when_required
|
|
||||||
R2_BUCKET: ${{ vars.R2_BUCKET }}
|
R2_BUCKET: ${{ vars.R2_BUCKET }}
|
||||||
R2_URL: ${{ vars.CF_R2_S3_API }}
|
R2_URL: ${{ vars.CF_R2_S3_API }}
|
||||||
|
|
||||||
|
@ -55,4 +55,16 @@ test.describe("App launch", () => {
|
|||||||
}),
|
}),
|
||||||
).resolves.not.toBeNull();
|
).resolves.not.toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test.describe("--no-update", () => {
|
||||||
|
test.use({
|
||||||
|
extraArgs: ["--no-update"],
|
||||||
|
});
|
||||||
|
|
||||||
|
// XXX: this test works fine locally but in CI the app start races with the test plumbing up the stdout/stderr pipes
|
||||||
|
// which means the logs are missed, disabling for now.
|
||||||
|
test.skip("should respect option", async ({ page, stdout }) => {
|
||||||
|
expect(stdout.data.toString()).toContain("Auto update disabled via command line flag");
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
@ -11,12 +11,37 @@ import fs from "node:fs/promises";
|
|||||||
import path, { dirname } from "node:path";
|
import path, { dirname } from "node:path";
|
||||||
import os from "node:os";
|
import os from "node:os";
|
||||||
import { fileURLToPath } from "node:url";
|
import { fileURLToPath } from "node:url";
|
||||||
|
import { PassThrough } from "node:stream";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A PassThrough stream that captures all data written to it.
|
||||||
|
*/
|
||||||
|
class CapturedPassThrough extends PassThrough {
|
||||||
|
private _chunks = [];
|
||||||
|
|
||||||
|
public constructor() {
|
||||||
|
super();
|
||||||
|
super.on("data", this.onData);
|
||||||
|
}
|
||||||
|
|
||||||
|
private onData = (chunk): void => {
|
||||||
|
this._chunks.push(chunk);
|
||||||
|
};
|
||||||
|
|
||||||
|
public get data(): Buffer {
|
||||||
|
return Buffer.concat(this._chunks);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
interface Fixtures {
|
interface Fixtures {
|
||||||
app: ElectronApplication;
|
app: ElectronApplication;
|
||||||
tmpDir: string;
|
tmpDir: string;
|
||||||
extraEnv: Record<string, string>;
|
extraEnv: Record<string, string>;
|
||||||
extraArgs: string[];
|
extraArgs: string[];
|
||||||
|
|
||||||
|
// Utilities to capture stdout and stderr for tests to make assertions against
|
||||||
|
stdout: CapturedPassThrough;
|
||||||
|
stderr: CapturedPassThrough;
|
||||||
}
|
}
|
||||||
|
|
||||||
const __dirname = dirname(fileURLToPath(import.meta.url));
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
||||||
@ -24,6 +49,16 @@ const __dirname = dirname(fileURLToPath(import.meta.url));
|
|||||||
export const test = base.extend<Fixtures>({
|
export const test = base.extend<Fixtures>({
|
||||||
extraEnv: {},
|
extraEnv: {},
|
||||||
extraArgs: [],
|
extraArgs: [],
|
||||||
|
|
||||||
|
// eslint-disable-next-line no-empty-pattern
|
||||||
|
stdout: async ({}, use) => {
|
||||||
|
await use(new CapturedPassThrough());
|
||||||
|
},
|
||||||
|
// eslint-disable-next-line no-empty-pattern
|
||||||
|
stderr: async ({}, use) => {
|
||||||
|
await use(new CapturedPassThrough());
|
||||||
|
},
|
||||||
|
|
||||||
// eslint-disable-next-line no-empty-pattern
|
// eslint-disable-next-line no-empty-pattern
|
||||||
tmpDir: async ({}, use) => {
|
tmpDir: async ({}, use) => {
|
||||||
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "element-desktop-tests-"));
|
const tmpDir = await fs.mkdtemp(path.join(os.tmpdir(), "element-desktop-tests-"));
|
||||||
@ -31,7 +66,7 @@ export const test = base.extend<Fixtures>({
|
|||||||
await use(tmpDir);
|
await use(tmpDir);
|
||||||
await fs.rm(tmpDir, { recursive: true });
|
await fs.rm(tmpDir, { recursive: true });
|
||||||
},
|
},
|
||||||
app: async ({ tmpDir, extraEnv, extraArgs }, use) => {
|
app: async ({ tmpDir, extraEnv, extraArgs, stdout, stderr }, use) => {
|
||||||
const args = ["--profile-dir", tmpDir];
|
const args = ["--profile-dir", tmpDir];
|
||||||
|
|
||||||
const executablePath = process.env["ELEMENT_DESKTOP_EXECUTABLE"];
|
const executablePath = process.env["ELEMENT_DESKTOP_EXECUTABLE"];
|
||||||
@ -49,8 +84,8 @@ export const test = base.extend<Fixtures>({
|
|||||||
args: [...args, ...extraArgs],
|
args: [...args, ...extraArgs],
|
||||||
});
|
});
|
||||||
|
|
||||||
app.process().stdout.pipe(process.stdout);
|
app.process().stdout.pipe(stdout).pipe(process.stdout);
|
||||||
app.process().stderr.pipe(process.stderr);
|
app.process().stderr.pipe(stderr).pipe(process.stderr);
|
||||||
|
|
||||||
await app.firstWindow();
|
await app.firstWindow();
|
||||||
|
|
||||||
|
@ -436,8 +436,9 @@ app.on("ready", async () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
if (argv["no-update"]) {
|
// Minimist parses `--no-`-prefixed arguments as booleans with value `false` rather than verbatim.
|
||||||
console.log('Auto update disabled via command line flag "--no-update"');
|
if (argv["update"] === false) {
|
||||||
|
console.log("Auto update disabled via command line flag");
|
||||||
} else if (global.vectorConfig["update_base_url"]) {
|
} else if (global.vectorConfig["update_base_url"]) {
|
||||||
console.log(`Starting auto update with base URL: ${global.vectorConfig["update_base_url"]}`);
|
console.log(`Starting auto update with base URL: ${global.vectorConfig["update_base_url"]}`);
|
||||||
void updater.start(global.vectorConfig["update_base_url"]);
|
void updater.start(global.vectorConfig["update_base_url"]);
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
"edit": "Golygu",
|
"edit": "Golygu",
|
||||||
"minimise": "Lleihau",
|
"minimise": "Lleihau",
|
||||||
"paste": "Gludo",
|
"paste": "Gludo",
|
||||||
"paste_match_style": "Gludo a Chyfateb Arddull",
|
"paste_match_style": "Arddull Gludo a Chyfateb",
|
||||||
"quit": "Gadael",
|
"quit": "Gadael",
|
||||||
"redo": "Ail-wneud",
|
"redo": "Ail-wneud",
|
||||||
"select_all": "Dewis y Cyfan",
|
"select_all": "Dewis y Cyfan",
|
||||||
@ -20,7 +20,7 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"about": "Ynghylch",
|
"about": "Ynghylch",
|
||||||
"brand_help": "%(brand)s Cymorth",
|
"brand_help": "Cymorth %(brand)s",
|
||||||
"help": "Cymorth",
|
"help": "Cymorth",
|
||||||
"preferences": "Dewisiadau"
|
"preferences": "Dewisiadau"
|
||||||
},
|
},
|
||||||
@ -40,18 +40,18 @@
|
|||||||
"unhide": "Datguddio"
|
"unhide": "Datguddio"
|
||||||
},
|
},
|
||||||
"right_click_menu": {
|
"right_click_menu": {
|
||||||
"add_to_dictionary": "Ychwanegu i'r Geiriadur",
|
"add_to_dictionary": "Ychwanegu at y geiriadur",
|
||||||
"copy_email": "Copïo cyfeiriad e-bost",
|
"copy_email": "Copïo cyfeiriad e-bost",
|
||||||
"copy_image": "Copïo delwedd",
|
"copy_image": "Copïo delwedd",
|
||||||
"copy_image_url": "Copïo cyfeiriad delwedd",
|
"copy_image_url": "Copïo cyfeiriad delwedd",
|
||||||
"copy_link_url": "Copïo cyfeiriad y ddolen",
|
"copy_link_url": "Copïo cyfeiriad y ddolen",
|
||||||
"save_image_as": "Cadw delwedd fel...",
|
"save_image_as": "Cadw delwedd fel...",
|
||||||
"save_image_as_error_description": "Methodd y ddelwedd â chadw",
|
"save_image_as_error_description": "Methodd cadw'r ddelwedd",
|
||||||
"save_image_as_error_title": "Wedi methu cadw'r ddelwedd"
|
"save_image_as_error_title": "Methodd cadw'r ddelwedd"
|
||||||
},
|
},
|
||||||
"view_menu": {
|
"view_menu": {
|
||||||
"actual_size": "Maint Gwirioneddol",
|
"actual_size": "Maint Gwirioneddol",
|
||||||
"toggle_developer_tools": "Toglo Developer Tools",
|
"toggle_developer_tools": "Toglo Offer Datblygwyr",
|
||||||
"toggle_full_screen": "Toglo Sgrin Lawn",
|
"toggle_full_screen": "Toglo Sgrin Lawn",
|
||||||
"view": "Golwg"
|
"view": "Golwg"
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user