Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release V3.3.2 #125

Merged
merged 3 commits into from
Nov 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "devtools-x",
"version": "3.3.0",
"version": "3.3.2",
"license": "MIT",
"type": "module",
"scripts": {
Expand Down
48 changes: 27 additions & 21 deletions scripts/sign.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ const releaseData = {
notes: `https://github.com/${repoMetaData.owner}/${repoMetaData.repo}/releases/tag/${latestRelease.tag_name}`,
pub_date: new Date().toISOString(),
platforms: {
// "darwin-aarch64": {
// signature: "",
// url: "",
// },
"darwin-aarch64": {
signature: "",
url: "",
},
"darwin-x86_64": {
signature: "",
url: "",
Expand All @@ -51,39 +51,45 @@ const promises = latestRelease.assets.map(
async ({ name, browser_download_url }) => {
const signature = await getSignature(browser_download_url);

if (name.endsWith(".app.tar.gz")) {
// releaseData.platforms["darwin-aarch64"].url = browser_download_url;
releaseData.platforms["darwin-x86_64"].url = browser_download_url;
// For Mac
if (name.includes("_aarch64.app.tar.gz")) {
releaseData.platforms["darwin-aarch64"].url = browser_download_url;
}

if (name.endsWith(".app.tar.gz.sig")) {
// releaseData.platforms["darwin-aarch64"].signature = signature;
releaseData.platforms["darwin-x86_64"].signature = signature;
if (name.includes("_x64.app.tar.gz")) {
releaseData.platforms["darwin-x86_64"].url = browser_download_url;
}

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

if (name.endsWith(".AppImage.tar.gz.sig")) {
releaseData.platforms["linux-x86_64"].signature = signature;
}

if (name.endsWith(".msi.zip")) {
// For Windows
if (name.includes("_x64_en-US.msi") && !name.endsWith(".sig")) {
releaseData.platforms["windows-x86_64"].url = browser_download_url;
}

if (name.endsWith(".msi.zip.sig")) {
// Signatures
if (name.includes("_aarch64.app.tar.gz.sig")) {
releaseData.platforms["darwin-aarch64"].signature = signature;
}
if (name.includes("_x64.app.tar.gz.sig")) {
releaseData.platforms["darwin-x86_64"].signature = signature;
}
if (name.includes("_amd64.AppImage.sig")) {
releaseData.platforms["linux-x86_64"].signature = signature;
}
if (name.includes("_x64_en-US.msi.sig")) {
releaseData.platforms["windows-x86_64"].signature = signature;
}
}
);

await Promise.allSettled(promises);

// if (!releaseData.platforms["darwin-aarch64"].url) {
// throw new Error("Failed to get release for MacOS");
// }
if (!releaseData.platforms["darwin-aarch64"].url) {
throw new Error("Failed to get release for MacOS");
}

if (!releaseData.platforms["linux-x86_64"].url) {
throw new Error("Failed to get release for Linux");
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "devtools-x"
version = "3.3.0"
version = "3.3.2"
description = "Developer tools desktop application"
authors = ["Sparkenstein"]
license = "MIT"
Expand Down
20 changes: 9 additions & 11 deletions src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,19 @@ fn main() {
read_qr
])
.setup(|app| {
#[cfg(desktop)]
let res = app
.handle()
.plugin(tauri_plugin_updater::Builder::new().build());
if res.is_err() {
println!("Error: {:?}", res.err());
}

WebviewWindowBuilder::new(app, "main", WebviewUrl::App("index.html".into()))
.title("DevTools-X")
.inner_size(1000.0, 650.0)
.inner_size(1000.0, 850.0)
.resizable(true)
.fullscreen(false)
.on_web_resource_request(|_, res| {
res.headers_mut().insert(
"Cross-Origin-Embedder-Policy",
"require-corp".try_into().unwrap(),
);
res.headers_mut().append(
"Cross-Origin-Opener-Policy",
"same-origin".try_into().unwrap(),
);
})
.build()?;
// #[cfg(debug_assertions)]
let process_arg: Vec<String> = env::args().collect();
Expand Down
30 changes: 7 additions & 23 deletions src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,11 @@
},
"productName": "devtools-x",
"mainBinaryName": "devtools-x",
"version": "3.3.0",
"version": "3.3.2",
"identifier": "com.fosslife.devtoolsx",
"plugins": {
"sql": {
"preload": [
"sqlite:devtools.db"
]
"preload": ["sqlite:devtools.db"]
},
"updater": {
"endpoints": [
Expand All @@ -63,13 +61,9 @@
"security": {
"assetProtocol": {
"enable": true,
"scope": [
"http://asset.localhost"
]
"scope": ["http://asset.localhost"]
},
"dangerousDisableAssetCspModification": [
"style-src"
],
"dangerousDisableAssetCspModification": ["style-src"],
"csp": {
"default-src": [
"'self'",
Expand All @@ -82,19 +76,9 @@
"https:",
"tauri:"
],
"worker-src": [
"'self'",
"blob:",
"https://unpkg.com"
],
"script-src": [
"'self'",
"'unsafe-inline'"
],
"style-src": [
"'self'",
"'unsafe-inline'"
]
"worker-src": ["'self'", "blob:", "https://unpkg.com"],
"script-src": ["'self'", "'unsafe-inline'"],
"style-src": ["'self'", "'unsafe-inline'"]
}
},
"windows": []
Expand Down
Loading