-
-
Notifications
You must be signed in to change notification settings - Fork 531
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(maker): add the dmg maker for the darwin target
- Loading branch information
1 parent
f21a87a
commit aaceb3f
Showing
4 changed files
with
25 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import electronDMG from 'electron-installer-dmg'; | ||
import fs from 'fs-promise'; | ||
import mkdirp from 'mkdirp'; | ||
import path from 'path'; | ||
import pify from 'pify'; | ||
import rimraf from 'rimraf'; | ||
|
||
export default async (dir, appName, forgeConfig) => { | ||
const outPath = path.resolve(dir, '../make', `${path.basename(dir)}.dmg`); | ||
if (await fs.exists(outPath)) { | ||
await pify(rimraf)(outPath); | ||
} | ||
await pify(mkdirp)(path.dirname(outPath)); | ||
const dmgConfig = Object.assign({ | ||
overwrite: true, | ||
}, forgeConfig.electronInstallerDMG, { | ||
appPath: path.resolve(dir, `${appName}.app`), | ||
name: appName, | ||
out: path.dirname(outPath), | ||
}); | ||
await pify(electronDMG)(dmgConfig); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters