feat: mac signinging and notarization

This commit is contained in:
Anoop M D 2023-02-22 19:15:37 +05:30
parent f22858219b
commit b38c25ca70
6 changed files with 46 additions and 5 deletions

View File

@ -18,7 +18,7 @@
"@tabler/icons": "^1.46.0",
"@tippyjs/react": "^4.2.6",
"@usebruno/graphql-docs": "0.1.0",
"@usebruno/schema": "0.2.0",
"@usebruno/schema": "0.3.1",
"axios": "^0.26.0",
"classnames": "^2.3.1",
"codemirror": "^5.65.2",

View File

@ -117,7 +117,7 @@ const Sidebar = () => {
</GitHubButton>
)}
</div>
<div className="flex flex-grow items-center justify-end text-xs mr-2">v0.9.4</div>
<div className="flex flex-grow items-center justify-end text-xs mr-2">v0.10.0</div>
</div>
</div>
</div>

View File

@ -1,6 +1,7 @@
node_modules
web
out
.env
pnpm-lock.yaml
package-lock.json

View File

@ -6,6 +6,7 @@ directories:
output: out
files:
- "**/*"
afterSign: notarize.js
mac:
artifactName: ${name}_${version}_${arch}_${os}.${ext}
category: public.app-category.developer-tools
@ -20,6 +21,7 @@ mac:
- arm64
icon: resources/icons/mac/icon.icns
hardenedRuntime: true
identity: "Anoop MD (W7LPPWA48L)"
entitlements: resources/entitlements.mac.plist
entitlementsInherit: resources/entitlements.mac.plist
linux:

View File

@ -0,0 +1,36 @@
require('dotenv').config();
const fs = require('fs');
const path = require('path');
const electron_notarize = require('electron-notarize');
const notarize = async function (params) {
if (process.platform !== 'darwin') {
return;
}
let appId = 'com.usebruno.app';
let appPath = path.join(params.appOutDir, `${params.packager.appInfo.productFilename}.app`);
if (!fs.existsSync(appPath)) {
console.error(`Cannot find application at: ${appPath}`);
return;
}
console.log(`Notarizing ${appId} found at ${appPath} using Apple ID ${process.env.APPLE_ID}`);
try {
await electron_notarize.notarize({
appBundleId: appId,
appPath: appPath,
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_ID_PASSWORD,
ascProvider: 'W7LPPWA48L'
});
} catch (error) {
console.error(error);
}
console.log(`Done notarizing ${appId}`);
};
module.exports = notarize;

View File

@ -1,5 +1,5 @@
{
"version": "0.9.4",
"version": "0.10.0",
"name": "bruno",
"description": "Opensource API Client",
"homepage": "https://www.usebruno.com",
@ -9,8 +9,8 @@
"scripts": {
"clean": "rimraf dist",
"dev": "electron .",
"dist": "electron-builder --mac --win --linux",
"pack-app": "electron-builder --dir"
"dist": "electron-builder --mac",
"pack": "electron-builder --dir"
},
"dependencies": {
"@usebruno/js": "0.2.0",
@ -19,7 +19,9 @@
"axios": "^0.26.0",
"chai": "^4.3.7",
"chokidar": "^3.5.3",
"dotenv": "^16.0.3",
"electron-is-dev": "^2.0.0",
"electron-notarize": "^1.2.2",
"electron-store": "^8.1.0",
"electron-util": "^0.17.2",
"form-data": "^4.0.0",