From 92821af8e994707f4ac5c5f26390b46b9f7015d4 Mon Sep 17 00:00:00 2001 From: David Hu Date: Thu, 12 Jan 2023 21:26:45 -0800 Subject: [PATCH] feat: update release script to build for m1 macs --- release.sh | 8 ++++++-- src-tauri/Cargo.lock | 11 +++++++++++ src-tauri/Cargo.toml | 1 + src-tauri/tauri.conf.json | 2 +- 4 files changed, 19 insertions(+), 3 deletions(-) diff --git a/release.sh b/release.sh index c41c674..9a2a55b 100644 --- a/release.sh +++ b/release.sh @@ -2,8 +2,12 @@ # this script should be replaces by github actions npm version patch -yarn tauri build +yarn tauri build --target aarch64-apple-darwin +yarn tauri build --target x86_64-apple-darwin version=$(grep version package.json | awk -F \" '{print $4}') echo "releasing version: $version" -gh release create $version "src-tauri/target/release/bundle/dmg/Kube Knots_${version}_x64.dmg" --generate-notes +gh release create $version \ + "src-tauri/target/x86_64-apple-darwin/release/bundle/dmg/kube-knots_${version}_x64.dmg" \ + "src-tauri/target/aarch64-apple-darwin/release/bundle/dmg/kube-knots_${version}_aarch64.dmgg" \ + --generate-notes diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 1c91e3b..a9d79da 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1632,6 +1632,7 @@ version = "0.0.0" dependencies = [ "k8s-openapi", "kube", + "openssl", "serde", "serde_json", "tauri", @@ -2082,6 +2083,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "111.24.0+1.1.1s" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3498f259dab01178c6228c6b00dcef0ed2a2d5e20d648c017861227773ea4abd" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.80" @@ -2091,6 +2101,7 @@ dependencies = [ "autocfg", "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index 0283e9f..cd92fdd 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -19,6 +19,7 @@ serde = { version = "1.0", features = ["derive"] } tauri = { version = "1.2", features = ["api-all"] } kube = { version = "0.78.0", features = ["runtime", "derive"] } k8s-openapi = { version = "0.17.0", features = ["v1_26"] } +openssl = { version = "0.10.35", features = ["vendored"] } [features] # by default Tauri runs in production mode diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 09622b5..979ff65 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -6,7 +6,7 @@ "distDir": "../dist" }, "package": { - "productName": "Kube Knots", + "productName": "kube-knots", "version": "../package.json" }, "tauri": {