Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
chore: code signing configuration for osx (#304)
Browse files Browse the repository at this point in the history
* chore: Bump electron-forge versions

* feat: update forge to use apple key

---------

Co-authored-by: Daniel Cortes <[email protected]>
  • Loading branch information
jowparks and dgca authored Jun 5, 2023
1 parent b868089 commit 461a551
Show file tree
Hide file tree
Showing 4 changed files with 346 additions and 461 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,4 +103,7 @@ dist/
.certs

#vscode
.vscode/
.vscode/

#certs
.certs
43 changes: 30 additions & 13 deletions forge.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable @typescript-eslint/no-var-requires */
const { resolve } = require('path')
const spawn = require('cross-spawn')
require('dotenv').config()

const COMMON_CONFIG = {
packagerConfig: {
Expand Down Expand Up @@ -60,9 +61,9 @@ const COMMON_CONFIG = {
const ENV_CONFIGS = {
dev: {
plugins: [
[
'@electron-forge/plugin-webpack',
{
{
name: '@electron-forge/plugin-webpack',
config: {
mainConfig: './webpack/dev/main.config.js',
devContentSecurityPolicy:
"connect-src 'self' https://cdn.jsdelivr.net/gh/umidbekk/react-flag-kit@1/assets/* 'unsave-eval'",
Expand All @@ -80,14 +81,14 @@ const ENV_CONFIGS = {
],
},
},
],
},
],
},
demo: {
plugins: [
[
'@electron-forge/plugin-webpack',
{
{
name: '@electron-forge/plugin-webpack',
config: {
mainConfig: './webpack/demo/main.config.js',
devContentSecurityPolicy:
"connect-src 'self' https://cdn.jsdelivr.net/gh/umidbekk/react-flag-kit@1/assets/* 'unsave-eval'",
Expand All @@ -105,7 +106,7 @@ const ENV_CONFIGS = {
],
},
},
],
},
],
publishers: [
{
Expand All @@ -123,10 +124,22 @@ const ENV_CONFIGS = {
],
},
production: {
packagerConfig: {
osxSign: {},
packagerConfig: {
// ...
osxNotarize: {
tool: 'notarytool',
appleApiKey: process.env.APPLE_API_KEY,
appleApiKeyId: process.env.APPLE_API_KEY_ID,
appleApiIssuer: process.env.APPLE_API_ISSUER,
},
},
},
plugins: [
[
'@electron-forge/plugin-webpack',
{
{
name: '@electron-forge/plugin-webpack',
config: {
mainConfig: './webpack/prod/main.config.js',
devContentSecurityPolicy:
"connect-src 'self' https://cdn.jsdelivr.net/gh/umidbekk/react-flag-kit@1/assets/* 'unsave-eval'",
Expand All @@ -144,7 +157,7 @@ const ENV_CONFIGS = {
],
},
},
],
},
],
publishers: [
{
Expand All @@ -163,7 +176,11 @@ const ENV_CONFIGS = {
},
}

module.exports = {
const config = {
...COMMON_CONFIG,
...ENV_CONFIGS[process.env['MODE'] || 'dev'],
}

console.log(JSON.stringify({ config }, null, 2))

module.exports = config
17 changes: 9 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
"publish:production": "nps publish.production"
},
"devDependencies": {
"@electron-forge/cli": "6.0.0-beta.66",
"@electron-forge/maker-deb": "6.0.0-beta.66",
"@electron-forge/maker-rpm": "6.0.0-beta.66",
"@electron-forge/maker-squirrel": "6.0.0-beta.66",
"@electron-forge/maker-zip": "6.0.0-beta.66",
"@electron-forge/plugin-webpack": "6.0.0-beta.66",
"@electron-forge/publisher-github": "6.0.0-beta.66",
"@electron-forge/cli": "^6.1.1",
"@electron-forge/maker-deb": "^6.1.1",
"@electron-forge/maker-rpm": "^6.1.1",
"@electron-forge/maker-squirrel": "^6.1.1",
"@electron-forge/maker-zip": "^6.1.1",
"@electron-forge/plugin-webpack": "^6.1.1",
"@electron-forge/publisher-github": "^6.1.1",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/user-event": "^14.2.0",
"@types/byte-size": "^8.1.0",
Expand All @@ -55,7 +55,8 @@
"cross-spawn": "^7.0.3",
"css-loader": "^6.0.0",
"del": "^7.0.0",
"electron": "^19.0.2",
"dotenv": "^16.0.3",
"electron": "^19.1.9",
"electron-devtools-installer": "^3.2.0",
"electron-is-dev": "^2.0.0",
"electron-reload": "^2.0.0-alpha.1",
Expand Down
Loading

1 comment on commit 461a551

@vercel
Copy link

@vercel vercel bot commented on 461a551 Jun 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

wallet-app – ./

wallet-app-git-master-ironfish.vercel.app
wallet-app-foo.vercel.app
wallet-app-ironfish.vercel.app

Please sign in to comment.