From 1eb15a50826d5d907ea1805414378a0e798dea7e Mon Sep 17 00:00:00 2001 From: Pierre Ferran Date: Fri, 31 May 2024 19:48:12 -0400 Subject: [PATCH] Tweaks to CI --- .github/workflows/release.yml | 7 ------- .gitignore | 2 ++ backend/src/sdk.cpp | 2 +- forge.config.ts | 18 ++++++++++++++++-- scripts/entitlements.plist | 12 ++++++++++++ 5 files changed, 31 insertions(+), 10 deletions(-) create mode 100644 scripts/entitlements.plist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23797cd..ca874c7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -138,13 +138,6 @@ jobs: dmg_file=$(find . -name "*.dmg" -type f) new_dmg_file=$(echo $dmg_file | sed 's/arm64/apple-silicon/') mv $dmg_file $new_dmg_file - - - name: Codesign dmg - if: matrix.os == 'macos-latest' - run: | - cd out/make - dmg_file=$(find . -name "*.dmg" -type f) - codesign --timestamp --verbose --sign "Developer ID Application" $dmg_file - id: relinfo uses: pozetroninc/github-action-get-latest-release@master diff --git a/.gitignore b/.gitignore index 6995ea7..f4c1ed9 100644 --- a/.gitignore +++ b/.gitignore @@ -106,3 +106,5 @@ build/ # Sentry Config File .sentryclirc + +.sign-env.sh diff --git a/backend/src/sdk.cpp b/backend/src/sdk.cpp index 5f04ed5..4b6c9a4 100644 --- a/backend/src/sdk.cpp +++ b/backend/src/sdk.cpp @@ -160,7 +160,7 @@ std::unique_ptr> SDK::buildRouter() .connection_close() .done(); }; - + router->add_handler( restinio::router::none_of_methods(restinio::http_method_get()), "/", methodNotAllowed); diff --git a/forge.config.ts b/forge.config.ts index 3197cf7..ad5e6ea 100644 --- a/forge.config.ts +++ b/forge.config.ts @@ -17,11 +17,25 @@ const canNotarize = process.env.APPLE_NOTARIZATION_PASSWORD && process.env.APPLE_TEAM_ID; +console.log("isMaking", isMaking); +console.log("canNotarize", canNotarize); + const config: ForgeConfig = { packagerConfig: { name: "TrackAudio", asar: true, - osxSign: isMaking ? {} : undefined, + osxSign: isMaking + ? { + optionsForFile: (filePath) => { + // Here, we keep it simple and return a single entitlements.plist file. + // You can use this callback to map different sets of entitlements + // to specific files in your packaged app. + return { + entitlements: "scripts/entitlements.plist", + }; + }, + } + : undefined, osxNotarize: canNotarize ? { appleId: process.env.APPLE_ID || "", @@ -57,7 +71,7 @@ const config: ForgeConfig = { { name: "@electron-forge/maker-dmg", config: { - icon: "resources/AppIcon/AppIcon.icns" + icon: "resources/AppIcon/AppIcon.icns", }, }, { diff --git a/scripts/entitlements.plist b/scripts/entitlements.plist new file mode 100644 index 0000000..a31141a --- /dev/null +++ b/scripts/entitlements.plist @@ -0,0 +1,12 @@ + + + + + com.apple.security.cs.allow-jit + + com.apple.security.device.audio-input + + com.apple.security.device.bluetooth + + + \ No newline at end of file