Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Fix ensu Tauri v1 release build

Prateek Sunal16c710739020
diff --git a/.github/workflows/ensu-release.yml b/.github/workflows/ensu-release.yml
index dc4de99823..609749b58e 100644
--- a/.github/workflows/ensu-release.yml
+++ b/.github/workflows/ensu-release.yml
@@ -91,7 +91,7 @@ jobs:
- name: Install Tauri dependencies
working-directory: rust/apps/ensu
- run: yarn install
+ run: yarn install --frozen-lockfile
- name: Fetch Rust dependencies
shell: bash
@@ -189,6 +189,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.ENSU_TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.ENSU_TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
+ TAURI_PRIVATE_KEY: ${{ secrets.ENSU_TAURI_SIGNING_PRIVATE_KEY }}
+ TAURI_KEY_PASSWORD: ${{ secrets.ENSU_TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.platform.os == 'macos-latest' && '10.15' || '' }}
CMAKE_OSX_DEPLOYMENT_TARGET: ${{ matrix.platform.os == 'macos-latest' && '10.15' || '' }}
APPLE_CERTIFICATE: ${{ secrets.MAC_OS_CERTIFICATE }}
diff --git a/rust/apps/ensu/package-lock.json b/rust/apps/ensu/package-lock.json
index ee565aca22..ac5a7aa9bc 100644
--- a/rust/apps/ensu/package-lock.json
+++ b/rust/apps/ensu/package-lock.json
@@ -1,12 +1,12 @@
{
"name": "ensu-tauri",
- "version": "0.1.7",
+ "version": "0.1.8",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "ensu-tauri",
- "version": "0.1.7",
+ "version": "0.1.8",
"dependencies": {
"@tauri-apps/api": "^1.5.0"
},
@@ -78,6 +78,159 @@
"node": ">= 10"
}
},
+ "node_modules/@tauri-apps/cli-darwin-x64": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.6.3.tgz",
+ "integrity": "sha512-1yTXZzLajKAYINJOJhZfmMhCzweHSgKQ3bEgJSn6t+1vFkOgY8Yx4oFgWcybrrWI5J1ZLZAl47+LPOY81dLcyA==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@tauri-apps/cli-linux-arm-gnueabihf": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.6.3.tgz",
+ "integrity": "sha512-CjTEr9r9xgjcvos09AQw8QMRPuH152B1jvlZt4PfAsyJNPFigzuwed5/SF7XAd8bFikA7zArP4UT12RdBxrx7w==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@tauri-apps/cli-linux-arm64-gnu": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.6.3.tgz",
+ "integrity": "sha512-G9EUUS4M8M/Jz1UKZqvJmQQCKOzgTb8/0jZKvfBuGfh5AjFBu8LHvlFpwkKVm1l4951Xg4ulUp6P9Q7WRJ9XSA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@tauri-apps/cli-linux-arm64-musl": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.6.3.tgz",
+ "integrity": "sha512-MuBTHJyNpZRbPVG8IZBN8+Zs7aKqwD22tkWVBcL1yOGL4zNNTJlkfL+zs5qxRnHlUsn6YAlbW/5HKocfpxVwBw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@tauri-apps/cli-linux-x64-gnu": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.6.3.tgz",
+ "integrity": "sha512-Uvi7M+NK3tAjCZEY1WGel+dFlzJmqcvu3KND+nqa22762NFmOuBIZ4KJR/IQHfpEYqKFNUhJfCGnpUDfiC3Oxg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@tauri-apps/cli-linux-x64-musl": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.6.3.tgz",
+ "integrity": "sha512-rc6B342C0ra8VezB/OJom9j/N+9oW4VRA4qMxS2f4bHY2B/z3J9NPOe6GOILeg4v/CV62ojkLsC3/K/CeF3fqQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@tauri-apps/cli-win32-arm64-msvc": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-1.6.3.tgz",
+ "integrity": "sha512-cSH2qOBYuYC4UVIFtrc1YsGfc5tfYrotoHrpTvRjUGu0VywvmyNk82+ZsHEnWZ2UHmu3l3lXIGRqSWveLln0xg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@tauri-apps/cli-win32-ia32-msvc": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.6.3.tgz",
+ "integrity": "sha512-T8V6SJQqE4PSWmYBl0ChQVmS6AR2hXFHURH2DwAhgSGSQ6uBXgwlYFcfIeQpBQA727K2Eq8X2hGfvmoySyHMRw==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
+ "node_modules/@tauri-apps/cli-win32-x64-msvc": {
+ "version": "1.6.3",
+ "resolved": "https://registry.npmjs.org/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.6.3.tgz",
+ "integrity": "sha512-HUkWZ+lYHI/Gjkh2QjHD/OBDpqLVmvjZGpLK9losur1Eg974Jip6k+vsoTUxQBCBDfj30eDBct9E1FvXOspWeg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "license": "MIT",
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">= 10"
+ }
+ },
"node_modules/semver": {
"version": "7.7.3",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz",
diff --git a/rust/apps/ensu/scripts/ci-enable-updater.mjs b/rust/apps/ensu/scripts/ci-enable-updater.mjs
index 508336f359..7f71090554 100644
--- a/rust/apps/ensu/scripts/ci-enable-updater.mjs
+++ b/rust/apps/ensu/scripts/ci-enable-updater.mjs
@@ -11,19 +11,31 @@ const endpoint = (
).trim();
const config = JSON.parse(fs.readFileSync(configPath, "utf8"));
-config.bundle = config.bundle || {};
-config.bundle.createUpdaterArtifacts = true;
+if (!config.tauri && config.bundle && typeof config.bundle === "object") {
+ config.bundle.createUpdaterArtifacts = true;
+}
if (pubkey) {
- config.plugins = config.plugins || {};
- config.plugins.updater = {
- pubkey,
- endpoints: [endpoint],
- };
- console.log(`Enabled updater artifacts + updater plugin config in ${configPath}`);
+ if (config.tauri && typeof config.tauri === "object") {
+ config.tauri.updater = {
+ ...(config.tauri.updater || {}),
+ active: true,
+ dialog: false,
+ pubkey,
+ endpoints: [endpoint],
+ };
+ } else {
+ config.plugins = config.plugins || {};
+ config.plugins.updater = {
+ ...(config.plugins.updater || {}),
+ pubkey,
+ endpoints: [endpoint],
+ };
+ }
+ console.log(`Enabled updater config in ${configPath}`);
} else {
console.log(
- `Enabled updater artifacts in ${configPath} (ENSU_TAURI_UPDATER_PUBKEY not set, leaving updater plugin config unchanged)`,
+ `No updater key configured for ${configPath}; leaving updater config unchanged`,
);
}
diff --git a/rust/apps/ensu/scripts/ci-enable-windows-signing.mjs b/rust/apps/ensu/scripts/ci-enable-windows-signing.mjs
index 7e689c24c5..b93bb085e8 100644
--- a/rust/apps/ensu/scripts/ci-enable-windows-signing.mjs
+++ b/rust/apps/ensu/scripts/ci-enable-windows-signing.mjs
@@ -16,11 +16,15 @@ if (!endpoint || !accountName || !profileName) {
}
const config = JSON.parse(fs.readFileSync(configPath, "utf8"));
-config.bundle = config.bundle || {};
-config.bundle.windows = config.bundle.windows || {};
+const bundleConfig = config.bundle ?? config.tauri?.bundle;
+if (!bundleConfig || typeof bundleConfig !== "object") {
+ throw new Error(`Unable to locate bundle config in ${configPath}`);
+}
+
+bundleConfig.windows = bundleConfig.windows || {};
const signerBinary = trustedSigningCliPath || "trusted-signing-cli";
-config.bundle.windows.signCommand = {
+bundleConfig.windows.signCommand = {
cmd: signerBinary,
args: [
"-e",