-
Notifications
You must be signed in to change notification settings - Fork 547
move debian packaging out to dedicated step #263
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
Conversation
Current package details
Current package file listClick to expand!
|
New package details
New package file listClick to expand!
|
@@ -172,5 +172,8 @@ | |||
"electron-builder": "22.4.1", | |||
"electron-packager": "^14.2.1", | |||
"electron-winstaller": "4.0.0" | |||
}, | |||
"optionalDependencies": { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to use this section because Windows will complain that it cannot install this.
Minor thing to be aware of if this ever gets upstreamed.
maintainer: 'Brendan Forster <github@brendanforster.com>', | ||
} | ||
|
||
export async function packageDebian(): Promise<string> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the pattern I stumbled upon for these modules - an exported function that does the work to perform the packaging, returning a string
when the promise resolves, or throwing an error if it cannot complete.
This felt a bit cleaner than using sync functions from Node to perform blocking work, and there's examples in here where we can convert a callback-based function into a promise-returning function using util.promisify
.
return Promise.reject('Windows is not supported') | ||
} | ||
|
||
const installer = require('electron-installer-debian') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is required inline because of the problem with the dependency not being present on Windows - easier to avoid this blowing up if the script is accidentally invoked.
'1024x1024': 'app/static/logos/1024x1024.png', | ||
}, | ||
scripts: { | ||
postinst: 'script/resources/deb/postinst.sh', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've moved the original linux-after-install.sh
and linux-after-remove.sh
scripts into this directory to indicate it's tied to a specific installer, and as we find ourselves maintaining specific files for different installers we can introduce additional directories.
Resolves #262
electron-installer-debian
optional for Windowsdpkg-deb
Section
andPriority
config valuesdepends
set works and app launchesgithub
command line shortcut worksmimeTypes
still work as expected