Skip to content

Commit

Permalink
10.08
Browse files Browse the repository at this point in the history
  • Loading branch information
kashamalasha committed Aug 11, 2023
1 parent 478d96c commit 86e8874
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 14 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ jobs:

- name: Install dependencies
run: npm install

- name: Test ubuntu
if: ${{ matrix.os }} == 'ubuntu-latest'
run: |
echo "I am running only on ${{ matrix.os }}"
- name: Decode Apple Developer certificate
run: |
Expand Down
22 changes: 11 additions & 11 deletions build/notarize.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const fs = require('fs');
const path = require('path');
const electronNotarize = require('@electron/notarize');
const fs = require(`fs`);
const path = require(`path`);
const electronNotarize = require(`@electron/notarize`);

module.exports = async function (context) {
let params = {
Expand All @@ -9,15 +9,15 @@ module.exports = async function (context) {
};

if (!process.env.GITHUB_ACTIONS) {
const dotenv = require('dotenv');
const result = dotenv.config({ path: path.join(__dirname, '.env') });
const dotenv = require(`dotenv`);
const result = dotenv.config({ path: path.join(__dirname, `.env`) });

params = {
...params,
appBundleId: process.env.APP_ID,
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APPLE_APP_SPECIFIC_PASSWORD,
teamId: process.env.APPLE_TEAM_ID
teamId: process.env.APPLE_TEAM_ID,
};

if (result.error) {
Expand All @@ -27,29 +27,29 @@ module.exports = async function (context) {
params = {
...params,
keychain: process.env.KEYCHAIN,
keychainProfile: process.env.KEYCHAIN_PROFILE
keychainProfile: process.env.KEYCHAIN_PROFILE,
};
}

if (process.platform !== 'darwin') {
if (process.platform !== `darwin`) {
return;
}
const prefix = ` •`;

console.log(`${prefix} afterSign hook triggered for the ${context.packager.appInfo.productFilename}.app`);
console.log(`${prefix} afterSign hook triggered for notarizing the ${context.packager.appInfo.productFilename}.app`);

if (!fs.existsSync(params.appPath)) {
console.log(`${prefix} !! notarization process was skipped due to File not found`);
return;
}

console.log(`${prefix} notarizing App file at ${params.appPath}`);
console.log(`${prefix} notarizing started for the App file at ${params.appPath}`);

try {
await electronNotarize.notarize(params);
} catch (error) {
console.error(error);
}

console.log(`${prefix} done notarizing for the ${context.packager.appInfo.productFilename}.app`);
console.log(`${prefix} notarizing finished successfully for the ${context.packager.appInfo.productFilename}.app`);
};
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const alert = (type, title, message, parentWindow = null) => {
type,
title,
message,
buttons: ['OK'],
buttons: [`OK`],
defaultId: 0,
icon: type,
};
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,7 @@
{
"target": "default",
"arch": [
"x64",
"arm64"
"universal"
]
}
]
Expand Down

0 comments on commit 86e8874

Please sign in to comment.