Skip to content

Commit e45ea9e

Browse files
authored
Merge pull request #125 from fosslife/master
release V3.3.2
2 parents 2da24e9 + 7225e0c commit e45ea9e

File tree

6 files changed

+46
-58
lines changed

6 files changed

+46
-58
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "devtools-x",
3-
"version": "3.3.0",
3+
"version": "3.3.2",
44
"license": "MIT",
55
"type": "module",
66
"scripts": {

scripts/sign.mjs

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ const releaseData = {
2828
notes: `https://github.com/${repoMetaData.owner}/${repoMetaData.repo}/releases/tag/${latestRelease.tag_name}`,
2929
pub_date: new Date().toISOString(),
3030
platforms: {
31-
// "darwin-aarch64": {
32-
// signature: "",
33-
// url: "",
34-
// },
31+
"darwin-aarch64": {
32+
signature: "",
33+
url: "",
34+
},
3535
"darwin-x86_64": {
3636
signature: "",
3737
url: "",
@@ -51,39 +51,45 @@ const promises = latestRelease.assets.map(
5151
async ({ name, browser_download_url }) => {
5252
const signature = await getSignature(browser_download_url);
5353

54-
if (name.endsWith(".app.tar.gz")) {
55-
// releaseData.platforms["darwin-aarch64"].url = browser_download_url;
56-
releaseData.platforms["darwin-x86_64"].url = browser_download_url;
54+
// For Mac
55+
if (name.includes("_aarch64.app.tar.gz")) {
56+
releaseData.platforms["darwin-aarch64"].url = browser_download_url;
5757
}
58-
59-
if (name.endsWith(".app.tar.gz.sig")) {
60-
// releaseData.platforms["darwin-aarch64"].signature = signature;
61-
releaseData.platforms["darwin-x86_64"].signature = signature;
58+
if (name.includes("_x64.app.tar.gz")) {
59+
releaseData.platforms["darwin-x86_64"].url = browser_download_url;
6260
}
6361

64-
if (name.endsWith(".AppImage.tar.gz")) {
62+
// For Linux
63+
if (name.includes("_amd64.AppImage") && !name.endsWith(".sig")) {
6564
releaseData.platforms["linux-x86_64"].url = browser_download_url;
6665
}
6766

68-
if (name.endsWith(".AppImage.tar.gz.sig")) {
69-
releaseData.platforms["linux-x86_64"].signature = signature;
70-
}
71-
72-
if (name.endsWith(".msi.zip")) {
67+
// For Windows
68+
if (name.includes("_x64_en-US.msi") && !name.endsWith(".sig")) {
7369
releaseData.platforms["windows-x86_64"].url = browser_download_url;
7470
}
7571

76-
if (name.endsWith(".msi.zip.sig")) {
72+
// Signatures
73+
if (name.includes("_aarch64.app.tar.gz.sig")) {
74+
releaseData.platforms["darwin-aarch64"].signature = signature;
75+
}
76+
if (name.includes("_x64.app.tar.gz.sig")) {
77+
releaseData.platforms["darwin-x86_64"].signature = signature;
78+
}
79+
if (name.includes("_amd64.AppImage.sig")) {
80+
releaseData.platforms["linux-x86_64"].signature = signature;
81+
}
82+
if (name.includes("_x64_en-US.msi.sig")) {
7783
releaseData.platforms["windows-x86_64"].signature = signature;
7884
}
7985
}
8086
);
8187

8288
await Promise.allSettled(promises);
8389

84-
// if (!releaseData.platforms["darwin-aarch64"].url) {
85-
// throw new Error("Failed to get release for MacOS");
86-
// }
90+
if (!releaseData.platforms["darwin-aarch64"].url) {
91+
throw new Error("Failed to get release for MacOS");
92+
}
8793

8894
if (!releaseData.platforms["linux-x86_64"].url) {
8995
throw new Error("Failed to get release for Linux");

src-tauri/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "devtools-x"
3-
version = "3.3.0"
3+
version = "3.3.2"
44
description = "Developer tools desktop application"
55
authors = ["Sparkenstein"]
66
license = "MIT"

src-tauri/src/main.rs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -169,21 +169,19 @@ fn main() {
169169
read_qr
170170
])
171171
.setup(|app| {
172+
#[cfg(desktop)]
173+
let res = app
174+
.handle()
175+
.plugin(tauri_plugin_updater::Builder::new().build());
176+
if res.is_err() {
177+
println!("Error: {:?}", res.err());
178+
}
179+
172180
WebviewWindowBuilder::new(app, "main", WebviewUrl::App("index.html".into()))
173181
.title("DevTools-X")
174-
.inner_size(1000.0, 650.0)
182+
.inner_size(1000.0, 850.0)
175183
.resizable(true)
176184
.fullscreen(false)
177-
.on_web_resource_request(|_, res| {
178-
res.headers_mut().insert(
179-
"Cross-Origin-Embedder-Policy",
180-
"require-corp".try_into().unwrap(),
181-
);
182-
res.headers_mut().append(
183-
"Cross-Origin-Opener-Policy",
184-
"same-origin".try_into().unwrap(),
185-
);
186-
})
187185
.build()?;
188186
// #[cfg(debug_assertions)]
189187
let process_arg: Vec<String> = env::args().collect();

src-tauri/tauri.conf.json

Lines changed: 7 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,11 @@
4444
},
4545
"productName": "devtools-x",
4646
"mainBinaryName": "devtools-x",
47-
"version": "3.3.0",
47+
"version": "3.3.2",
4848
"identifier": "com.fosslife.devtoolsx",
4949
"plugins": {
5050
"sql": {
51-
"preload": [
52-
"sqlite:devtools.db"
53-
]
51+
"preload": ["sqlite:devtools.db"]
5452
},
5553
"updater": {
5654
"endpoints": [
@@ -63,13 +61,9 @@
6361
"security": {
6462
"assetProtocol": {
6563
"enable": true,
66-
"scope": [
67-
"http://asset.localhost"
68-
]
64+
"scope": ["http://asset.localhost"]
6965
},
70-
"dangerousDisableAssetCspModification": [
71-
"style-src"
72-
],
66+
"dangerousDisableAssetCspModification": ["style-src"],
7367
"csp": {
7468
"default-src": [
7569
"'self'",
@@ -82,19 +76,9 @@
8276
"https:",
8377
"tauri:"
8478
],
85-
"worker-src": [
86-
"'self'",
87-
"blob:",
88-
"https://unpkg.com"
89-
],
90-
"script-src": [
91-
"'self'",
92-
"'unsafe-inline'"
93-
],
94-
"style-src": [
95-
"'self'",
96-
"'unsafe-inline'"
97-
]
79+
"worker-src": ["'self'", "blob:", "https://unpkg.com"],
80+
"script-src": ["'self'", "'unsafe-inline'"],
81+
"style-src": ["'self'", "'unsafe-inline'"]
9882
}
9983
},
10084
"windows": []

0 commit comments

Comments
 (0)