Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improved electron-reforger config #147

Merged
merged 2 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
publish:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [ ubuntu-latest, macos-latest, windows-latest ]

runs-on: ${{ matrix.os }}
steps:
Expand All @@ -28,7 +28,7 @@ jobs:
field: KEY
value: ${{ secrets.SENTRY_KEY }}

- name: publish
- name: Publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npm run publish
Expand Down
10 changes: 10 additions & 0 deletions assets/entitlements.plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.security.cs.allow-jit</key>
<true/>
<key>com.apple.security.cs.debugger</key>
<true/>
</dict>
</plist>
File renamed without changes.
64 changes: 64 additions & 0 deletions forge.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
const path = require('path')

// Taken over from https://github.com/electron/fiddle/blob/main/forge.config.js

const iconPath = path.resolve(__dirname, 'assets', 'icon.icns')

const config = {
packagerConfig: {
icon: iconPath,
executableName: 'swarm-desktop',
name: 'Swarm Desktop',
appBundleId: 'org.ethswarm.swarmDesktop',
win32metadata: {
CompanyName: 'Swarm Foundation',
OriginalFilename: 'Swarm Desktop',
},
osxSign: {
hardenedRuntime: true,
'gatekeeper-assess': false,
entitlements: 'assets/entitlements.plist',
'entitlements-inherit': 'assets/entitlements.plist',
},
},
electronInstallerDebian: {
bin: 'Swarm Desktop',
},
makers: [
{
name: '@electron-forge/maker-squirrel',
config: {
name: 'swarm-desktop',
},
},
{
name: '@electron-forge/maker-dmg',
config: {
icon: iconPath,
},
},
{
name: '@electron-forge/maker-deb',
config: {},
},
{
name: '@electron-forge/maker-rpm',
config: {},
},
],
publishers: [
{
name: '@electron-forge/publisher-github',
config: {
repository: {
owner: 'ethersphere',
name: 'swarm-desktop',
},
prerelease: true,
draft: false,
},
},
],
}

module.exports = config
Binary file removed icon.png
Binary file not shown.
46 changes: 0 additions & 46 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,52 +39,6 @@
"desktop"
],
"license": "BSD-3-Clause",
"config": {
"forge": {
"packagerConfig": {
"icon": "icon.icns",
"executableName": "swarm-desktop"
},
"electronInstallerDebian": {
"bin": "Swarm Desktop"
},
"makers": [
{
"name": "@electron-forge/maker-squirrel",
"config": {
"name": "bee_desktop"
}
},
{
"name": "@electron-forge/maker-zip",
"platforms": [
"darwin"
]
},
{
"name": "@electron-forge/maker-deb",
"config": {}
},
{
"name": "@electron-forge/maker-rpm",
"config": {}
}
],
"publishers": [
{
"name": "@electron-forge/publisher-github",
"config": {
"repository": {
"owner": "ethersphere",
"name": "bee-desktop"
},
"prerelease": true,
"draft": false
}
}
]
}
},
"devDependencies": {
"@electron-forge/cli": "^6.0.0-beta.63",
"@electron-forge/maker-deb": "^6.0.0-beta.63",
Expand Down